Skip to content
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

Avoid visiting login page again on back button click #8537

Merged
merged 3 commits into from Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -23,3 +23,4 @@
- turansky
- underager
- vijaypushkin
- kantuni
2 changes: 1 addition & 1 deletion examples/auth/src/App.tsx
Expand Up @@ -136,7 +136,7 @@ function RequireAuth({ children }: { children: JSX.Element }) {
// trying to go to when they were redirected. This allows us to send them
// along to that page after they login, which is a nicer user experience
// than dropping them off on the home page.
return <Navigate to="/login" state={{ from: location }} />;
return <Navigate to="/login" state={{ from: location }} replace={true} />;
timdorr marked this conversation as resolved.
Show resolved Hide resolved
}

return children;
Expand Down