-
Notifications
You must be signed in to change notification settings - Fork 28
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
Implement session revocation #267
Comments
I recall that token revocation still needs to be supported in the underlying OAuth module, which is a blocker. I raised an issue requesting the functionality to be added. There are two solutions:
We might discuss this and come back to you. We may have to live without token revocation for the time being. |
Thank you. Good to know about oauth4webapi, that seems like it might be a nice lower level alternative to fall back to if it comes to that. For anyone struggling with the same issue, here's how to actually sign out (when using Auth0 provider, but other providers probably work in similar manner), while still working with deno_kv_auth:
In addition, you may want to use the forced login prompt mentioned earlier upon signIn, however this may hide any issues you may have with the signOut procedure, so use with caution:
Disclaimer: this seems to work, but I'm not an auth expert so can't give any guarantees about correctness or compliance with "best practices" |
Hi @raashidanwar, we can take one of two paths:
We have yet to decide on this, but I would happily discuss it further. I don't use Slack, but I am on Discord under the same username. If you haven't already, you might want to join Deno's Discord server. |
Signout function here only deletes the session locally on the server, but does not actually revoke the authentication with the provider: https://github.com/denoland/deno_kv_oauth/blob/main/lib/sign_out.ts
This causes browser to remember earlier credentials even after signout, so that when any user tries to sign in again using the same computer, the earlier authentication is just renewed without any prompt.
You can work around this issue, at least when using Auth0 provider, with the prompt parameter:
const response = signIn(request, oauthConfig, { urlParams: {prompt: "login"}});
This forces the provider to present the login screen again every time signin is called, even if there is a previous session left dangling. This is not secure however, as really the session should be revoked with the provider upon signout..
The text was updated successfully, but these errors were encountered: