-
Notifications
You must be signed in to change notification settings - Fork 365
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
[Auth0] Allow redirecting to custom URL after logout #722
Conversation
This can't be just done by setting logout_redirect_url unfortunately, as client_id is also required to be passed in here (see https://auth0.com/docs/authenticate/login/logout/redirect-users-after-logout). While that could be done via a callable, this is much cleaner to do.
for more information, see https://pre-commit.ci
Otherwise, you just get stuck on a page that says 'OK'. Contributed upstream in jupyterhub/oauthenticator#722 Upstream work is tracked via 2i2c-org#3637
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuvipanda, I believe some form of logout and redirect should be possible without the client id too as Auth0 supports logout at different session "levels".
-
According to auth0 docs, for logout requests that do not include the client_id parameter the returnTo URL must be added to the Allowed Logout URLs list in the Advanced tab of the Tenant Settings ➡️ which logouts at Auth0 Session Layer
-
Whereas, for logout requests that include the client_id parameter the returnTo URL must be added to the Allowed Logout URLs list in the Settings tab of the Auth0 app that is associated with the specified CLIENT_ID. ➡️ which logouts out at the Application Session Layer
Can it be that simply setting the logout_redirect_url
didn't work because it might not have been added to the appropriate Allowed Logout URLs (i.e. at tenant level)?
Either way, we can support logging out at the app level as well, which is what this PR does. Though the only suggestion would be in this case to name this new config different so that it's less confusing by being less similar to the initial one (logout_redirect_url) and that it's clear that it does an app-level logout?
I was experimenting with this today, and here are my results:
Ok so that's a bit redundant, but at least what I've discovered so far seems to be that @GeorgianaElena from your links, it's possible that perhaps this logout url was added by the community to the wrong location. I'll follow up and debug some more. It would be nice to not need this! |
From my experimentation in #722 (comment), I've noticed that you must specify However, With that, I think it's ok to close this PR! |
This can't be just done by setting logout_redirect_url unfortunately, as client_id is also required to be passed in here (see https://auth0.com/docs/authenticate/login/logout/redirect-users-after-logout).
While that could be done via a callable, this is much cleaner to do.