Remix app how to redirect to previous page post login
in my remix js app I have http://localhost:9001/app behind auth.
So when users lands at
http://localhost:9001/app/xyz
it successfully goes to login page if users is not authenticated, but after login user is being redirected to homepage http://localhost:9001/
I would like to change that. Please guide me.🐮
My loader at the moment withing /app.tsx
if any pages loads at /app/new it is automatically behind auth.
4 Replies
Hey @Ajinkya,
Thanks for reaching out.
in my remix js app I have http://localhost:9001/app behind auth. So when users lands atIn this case, would you want the user to be redirected tohttp://localhost:9001/app/xyz
it successfully goes to login page if users is not authenticated, but after login user is being redirected to homepagehttp://localhost:9001/
I would like to change that. Please guide me.🐮
http://localhost:9001/app/xyz
after they're authenticated?Yes . At the moment if I login the page redirects back to localhost. Even if it redirects to /app that's is also great.
Hi, this doesn't sound right, if you could you please raise a bug on the repo, ideally with a minimal repoduction example we will get this checked into.
I have kinde auth file as given in kinde docs wrt to Remix SDK.
app/routes/kinde-auth.$index.tsx
And in app/routes/ap.tsx
I have the following code:
Also I have exact same env file which was shared in Kinde auth setup page for the remix engine.
Raise bug as in on kinde auth GitHub repo ?
Please let me know do you need anything apart from this.
As my repo is private