Session not cleared if user uses Back after logout
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- react, typescript
- Domaine
- authentication, frontend
Piste de recherche
Commencez par reproduire la séquence de connexion, de déconnexion et de retour arrière du navigateur dans Chrome avec auth0-react v2.2.1 et React 17.0.2, en comparant l’utilisation normale avec les outils de développement ouverts et avec l’auth0-react sample app. Suivez la configuration de Auth0Provider et le callback de navigation présentés dans le rapport ; le travail est terminé lorsque le fait d’appuyer sur Back après la déconnexion ne peut pas restaurer un état authentifié de l’application et que le comportement lors de l’actualisation reste correct.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Checklist
- The issue can be reproduced in the auth0-react sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
After calling logout the user is redirect back to our login page, but if they go back with their browser they can get back into the application and perform authenticated actions. Calling refresh at any time throws them out of the application, and the auth0 logs show a successful logout.
To add more mystery to this, it does not happen consistently. For example, if the developer tools are open in the browser, the problem goes away and going back throws the user onto the login screen.
Reproduction
- login
- logout
- press back
- find yourself logged in again.
It seems to be mitigated by having the developer tools open, but is pretty much consistent in normal use. Also unable to replicate it on a localhost dev build.
Additional context
This is our auth provider
const onRedirectCallback = (appState?: AppState) => {
navigate(appState?.returnTo || window.location.pathname);
};
...
<Auth0Provider
domain={config.auth0.domain}
clientId={config.auth0.clientId}
authorizationParams={{
redirect_uri: window.location.origin,
audience: config.auth0.audience,
}}
onRedirectCallback={onRedirectCallback}
useRefreshTokens
cacheLocation={config.auth0.cacheLocation} // undefined expect for e2e tests
>
auth0-react version
v2.2.1
React version
17.0.2
Which browsers have you tested in?
Chrome
- Langage dominant
- TypeScript
- Étoiles
- 992
- Forks
- 294
- Merge moyen
- 11 h 1 min
- PR mergées (30 j)
- 51
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de auth0/auth0-react
-
Users getting logged out with "Unsuccessful Refresh Token exchange, reused refresh token detected"Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
auth0/auth0-react#929 · 19 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de auth0/auth0-react
Issues similaires
-
area: cli bug flake ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
gazetta-studio/gazetta-studio#1772 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
microsoft/playwright#43875 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
README translations: ja, ko, deOuvertedocumentation good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
feature
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
calagopus/panel#285 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour