thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server

Home Page:https://oauth2.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid_scope when trying to get new access using refresh token

akshare opened this issue · comments

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?

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.