thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server
https://oauth2.thephpleague.com
MIT License
6.49k stars 1.12k forks source link

invalid_scope when trying to get new access using refresh token #1345

Closed akshare closed 1 year ago

akshare commented 1 year ago

Hi,

I've got my client as well as auth server working using authorization code grant with pkce.

I'm able to generate access token and also include refresh token with it.

Next, I'm trying to generate new access tokens when it expires using the refresh token.

For the server, I followed the instructions at https://oauth2.thephpleague.com/authorization-server/refresh-token-grant/.

For the client, "Refreshing a token" example at https://oauth2-client.thephpleague.com/usage/.

However, I'm getting the response invalid_scope from the auth server.

Any ideas?

akshare commented 1 year ago

After trying a few things, in the last attempt, I didn't set the scope and now refresh token is able get new access token.

This might be an implementation issue on my end.