remix-auth-auth0
remix-auth-auth0 copied to clipboard
Add logout support
Describe the bug
Currently, the authenticator.logout method is not logging the user out in auth0.
See this issue for further details:
https://github.com/sergiodxa/remix-auth-oauth2/issues/15
Current usage
Right now I have to manually do the auth0 logout by doing a double redirect in my logout function:
export const loader: LoaderFunction = async ({ request }) => {
return authenticator.logout(request, {
redirectTo: `https://${appConfig.auth0.issuerBaseUrl}/v2/logout?client_id=${appConfig.auth0.clientId}&returnTo=${appConfig.auth0.baseUrl}/auth/login`,
});
};
Expected usage
export const loader: LoaderFunction = async ({ request }) => {
return authenticator.logout(request, {
redirectTo: `/auth/login`,
});
};
Your Example Website or App
https://test.com
Steps to Reproduce the Bug or Issue
- Use
authenticator.logout
- Try to log in again
- The user is automatically logged in as the auth0 logout endpoint never got called
Expected behavior
Ths user should be logged out of auth0 when using authenticator.logout
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Currently blocking on https://github.com/sergiodxa/remix-auth/discussions/125
Are there any updates regarding this issue?
Are there any updates regarding this issue?
Hello! At the moment my work consumes almost all my hours, as soon as I have any free time will look into this issue to work on it
Updates?
Seems like https://github.com/sergiodxa/remix-auth needs to add the option to use the strategy for logout first. :(
@sergiodxa
@roj1512 - looks like @sergiodxa doesn't think this is related to remix-auth
: https://github.com/sergiodxa/remix-auth-oauth2/issues/15#issuecomment-1081317830
@danestves