Search code examples
serverfirebase-authenticationnetlify

Are cookie based redirects possilbe on Netlify?


I have a web app that uses firebase for auth. Once a user signs up/logs in there is always a certain cookie present.

I would like to, based on the presence of that cookie, redirect the user from the root path to a sub path i.e. site.com=>site.com/app whenever they visit the site.

I'm using Netlify to host my site and I've read through their documentation but I can't figure out anyway to do this. It appears as though the only "conditions" that can be used for a redirect are langauge & role, but nothing about cookies.

Maybe this is possible using JWT Roles?


Solution

  • It's not possible today, but you can keep an eye on this thread: https://community.netlify.com/t/expanding-functionality-of-redirects/988/36?u=goleary