Closed noon974 closed 6 years ago
Something were wrong with my config.yml (I'm using PHPStorm deployment feature when working locally on the source code). If I do the same changes on the server file, without deployment upload of PHPStorm, everything's fine.
Hi,
I'm trying to use supported_scopes up and running for my project. As soon as I add the supported_scopes field in my config.yml :
`fos_oauth_server:
I'm getting this from Postman when requesting a token :
Here is the payload of the call made by Postman :
{ "grant_type": "client_credentials", "client_id": "myclientId", "client_secret": "mysecret", "scope": "user" }
If I remove the "supported_scopes" from config.yml and the scope from the post payload, I'll get my oauth token as expected.
So, I started digging into oauth2-php library and put some dump to see what's happening. When "suported_scopes" is set in config.yml, the ClientManager return : `Client {#612 ▼
id: "myId"
name: "BackOffice"
scope: array:2 [▶]
randomId: null
secret: null
redirectUris: []
allowedGrantTypes: []
}`
When config.yml doesn't contains the supported_scopes, I get : `Client {#2288 ▼
id: "myId"
name: "BackOffice"
scope: array:2 [▶]
randomId: "myrandomId"
secret: "mySecret"
redirectUris: []
allowedGrantTypes: array:1 [▶]
}`
It seems that the OAuthClient object is not well hydrated ... any clues of why this is happening ?