Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

logout() Expected Behavior #23

Open
whichsteveyp opened this issue Apr 17, 2020 · 1 comment
Open

logout() Expected Behavior #23

whichsteveyp opened this issue Apr 17, 2020 · 1 comment

Comments

@whichsteveyp
Copy link

Hello! I'm making a very simple application as a side project just to experiment with next.js and auth0 a little bit more and get back into some engineering. I had a question about the default behavior expectations for some of these APIs - I'm not sure if some of this is associated with auth0 behavior or with this library. Sorry if this is obvious and/or in the wrong place!

Given an <Auth0Provider redirectUri={process.env.PROD_OR_LOCAL_HOST} /> scenario, in which the base redirect will either be the deployed environment, or https://localhost:3000/ by default when developing, what would you expect to occur when calling logout() with no additional options?

I had expected to be redirect to Auth0, and then back to localhost:3000 - however I'm redirected back to my production environment.

Looking through the code it seems these are unaware of any provider level props, and they don't account for or attempt to merge any defaults in.

Would that be worth adding in here, or is that a nice DX at the expense of a poor API augmentation? It seems the work around is to only ever invoke logout() with the correct environment-aware returnTo variable, otherwise you wind up back in production based on the Auth0 default behavior.

@sandrinodimattia
Copy link
Owner

All of the concepts of this library have been moved to the official Auth0 SDK for React (https://github.com/auth0/auth0-react), so I'll be archiving this repository shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants