Next.js Discord

Discord Forum

Protected routes with firebase?

Unanswered
Cicada killer posted this in #help-forum
Open in Discord
Cicada killerOP
Has anyone got a solution to creating protected routes with firebase auth? I tried using middleware but it doesnt work with async functions and then I tried checking state in each page but i would run into a weird interaction where once the auth was checked for a split second you could see the page which is obviously not what I want. Does anyone have any solutions to this?

Additional context I have been stuck on this for around 3 days now and its my first next js app.

0 Replies