remix-auth-auth0 icon indicating copy to clipboard operation
remix-auth-auth0 copied to clipboard

Add logout support

Open franzwilhelm opened this issue 2 years ago • 8 comments

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

  1. Use authenticator.logout
  2. Try to log in again
  3. 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

franzwilhelm avatar Mar 28 '22 08:03 franzwilhelm

Currently blocking on https://github.com/sergiodxa/remix-auth/discussions/125

franzwilhelm avatar Mar 28 '22 08:03 franzwilhelm

Are there any updates regarding this issue?

EdenTurgeman avatar Dec 05 '22 08:12 EdenTurgeman

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

danestves avatar Jan 11 '23 00:01 danestves

Updates?

rojvv avatar Jan 22 '23 17:01 rojvv

Seems like https://github.com/sergiodxa/remix-auth needs to add the option to use the strategy for logout first. :(

meza avatar Feb 20 '23 20:02 meza

@sergiodxa

rojvv avatar Feb 21 '23 10:02 rojvv

@roj1512 - looks like @sergiodxa doesn't think this is related to remix-auth: https://github.com/sergiodxa/remix-auth-oauth2/issues/15#issuecomment-1081317830

stephencweiss avatar Feb 21 '23 13:02 stephencweiss

@danestves

rojvv avatar Feb 21 '23 13:02 rojvv