Replies: 5 comments 5 replies
-
Do you want the back button to not show the authentication pages? |
Beta Was this translation helpful? Give feedback.
-
Good question. I'm stuck on this, too. |
Beta Was this translation helpful? Give feedback.
-
Did anyone ever figure this out? Seems the team abstracted away the history stack in v6 whereas I'd much rather roll my own history stack for my use case. I've been stuck on this a few months I think. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've opened a PR for this: #11100 |
Beta Was this translation helpful? Give feedback.
-
I'm migrating some code to use a loader instead of a wrapper component and
useEffect
to handle authentication callbacks. Part of this involves redirecting the user back to the route that they were on when they started authenticating - so that it doesn't disrupt their flow.All of that works fine, but I've noticed that when using
redirect
instead ofuseNavigate
then there's no way to replace the current URL in the history.i.e. what I had before was:
What I've got now in my loader is:
And you end up on the correct page just fine, but the callback URL is in the history meaning that the back button doesn't work as desired.
Is there any way of doing this from within a loader?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions