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

OAuth2 token request with refresh token failed #555

Closed
margaretha opened this issue Mar 21, 2023 · 3 comments
Closed

OAuth2 token request with refresh token failed #555

margaretha opened this issue Mar 21, 2023 · 3 comments
Labels
Milestone

Comments

@margaretha
Copy link
Contributor

margaretha commented Mar 21, 2023

OAuth2 token request with refresh token returns

{"error_description":"Refresh token is expired","error":"invalid_grant"}

because the value of expiry_date in the oauth2_refresh_token table is identical to that of created_date .

The issue was reported by @notesjor

@margaretha margaretha added the bug label Mar 21, 2023
@margaretha
Copy link
Contributor Author

Expiry date of refresh token can now be customized in client registration . This feature requires an additional database column refresh_token_expiry in the oauth2_client table.

For older clients, the values of refresh_token_expiry is set to 0, which makes the expiry_date of their refresh token identical to the created_date of the refresh tokens.

@margaretha margaretha added this to the Version 0.69.3 milestone Mar 28, 2023
@margaretha
Copy link
Contributor Author

refresh_token_expiry allows KorAP OAuth2 clients to define how long refresh tokens should last, according to its purposes.

refresh_token_expiry=0 has been updated to 31536000 that is equivalent to 1 year.

@notesjor could you please check again if the request works for you?

@margaretha
Copy link
Contributor Author

The request has been tested and it works as expected.

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

No branches or pull requests

1 participant