-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Bug report
Describe the bug
It appears the the RefreshToken() function will not refresh the current token if it has expired. You can see here that it explicitly throws an error if it is expired. How is this proper behavior? Doesn't this behavior defeat the purpose of the refresh token, to be able to refresh the access token if it has already expired? Or is there something I am not understanding with how to use this API?
gotrue-csharp/Gotrue/Client.cs
Lines 715 to 716 in 4c5f219
| if (CurrentSession!.Expired()) | |
| throw new GotrueException("Session expired", ExpiredRefreshToken); |
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Call RefreshToken() when CurrentSession is expired.
Expected behavior
I would expect the current token to be refreshed even if the current token is expired.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: [e.g. macOS, Windows]
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: [e.g. 6.0.2]
- Version of Node.js: [e.g. 10.10.0]
Additional context
Add any other context about the problem here.