Next.js Discord

Discord Forum

NextJs routing for SignIn

Unanswered
Varun posted this in #help-forum
Open in Discord
I have a website where users can sign in(tunedinapp.com) and right now after a user signs in we redirect them to the /web route with their email as a searchPAram. If they reload on this route, they get a 404 page. I added a middleware.js and now when they reload it takes them back to this page. But this causes an obvious security risk because now anyone can add the url as a searchparam to the web route to access their account. Is there a way to verify that a user has signedin using browser history or something. If it matters, I'm using firebase for authentication

3 Replies