-
Notifications
You must be signed in to change notification settings - Fork 6
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
Client creates a new token for each page load/refresh #53
Comments
Should be fixed by #75, which stores the token details in session storage. New windows or tabs will probably still issue token requests, because they don't share session storage. |
Actually, reading this again, this might be a bug in |
Sticking the token in local storage could be an issue for shared computers, ideally a sign out event will clean this up combined with a check on expired tokens during page load, etc. However we can certainly be smarter about token expiration and re-use than what we currently are. Specifically auth.js and oauth.js share common concerns around token lifecycle events but don't share any code. Ideally we should have different strategies:
|
This is called from panoptes-javascript-client/lib/auth.js Lines 39 to 64 in 4ef31ec
|
Both credential flow ( OAuth 2.1 doesn’t allow the credentials flow at all. |
I'm not sure what's going on, but if you look at the Network requests you'll see a
POST /oauth/token
every time, which then generates a new token on the Panoptes side. Shouldn't the client, after login, stick the access token, refresh token and expiry time somewhere in a cookie/localstorage and keep using that?The text was updated successfully, but these errors were encountered: