Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with refresh token ? #76

Open
shaansharma1980 opened this issue Feb 14, 2015 · 1 comment
Open

Bug with refresh token ? #76

shaansharma1980 opened this issue Feb 14, 2015 · 1 comment

Comments

@shaansharma1980
Copy link

In the function grantAccessTokenRefreshToken in OAuth2.php, it does a fetch for the current token object,
$token = $this->storage->getRefreshToken($input["refresh_token"]);

if ($token === null || $client->getPublicId() !== $token->getClientId()) {
.... }
In the above condition, $token->getClientId() leads to null as the client is not set on the token object.

I'm not sure if this is a bug or not, I'm a new user so just trying to understand the library and was runnin throught the refresh bit to get it working, I had to put in $token->setClient($client); before the condition is checked above to get it working -> but not happy with putting it in this way.

Could you check and let me know if you think its something specific to my implementation, i'm using sylius standard at the moment with the current build.

@jeremyb
Copy link

jeremyb commented Mar 6, 2015

Hi @CitrusTech,

If your client is empty on the RefreshToken object it's probably a mapping issue...
Are you using the FOSOAuthServerBundle or the standalone lib?
You should browse your database to be sure that the Client relation is set on the AccessToken and RefreshToken tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants