laravel-openid-connect-server icon indicating copy to clipboard operation
laravel-openid-connect-server copied to clipboard

Error 'openid' scopes on AbstractGrant

Open SkySteveRuru opened this issue 1 year ago • 1 comments

Hi please help me

I'm having problem when I try to GET /authorize I've followed the example in www.idaas.nl/guide/openid.html

But it seems like there's an error with the 'openid' scope itself

I'm using Laravel 8.83.27 nl.idaas/laravel-openid-connect v.0.2.8

Here's the URI with params. The client credentials is right. http://localhost:8000/api/oauth/authorize?response_type=code&client_id=9a57e653-1fb0-4964-b688-08a626985bf8&redirect_uri=http://localhost:8000&scope=openid&state=adsf324&nonce=34sdf123

What I found is the 'openid' scope become null on this line of code on AbstractGrant

Screenshot 2023-10-12 at 15 08 36

SkySteveRuru avatar Oct 12 '23 08:10 SkySteveRuru

I guess you'll need to make sure the ScopeRepository returns something for the openid scope. That is, you should populate the scopes table as provided by the Laravel Passport package.

Here an example of how it is done in idaas.nl : https://github.com/idaas-nl/idaas.nl/blob/62b2c72969cf4cd42bf7da0d2f6709f96c4c533b/app/Console/Commands/NewTenant.php#L263C25-L263C35

This should be added to the documentation.

arietimmerman avatar Oct 12 '23 08:10 arietimmerman