Vercel preview deployment domain error with Firebase auth #6359
              
                Unanswered
              
          
                  
                    
                      pulkitvyas08
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| 
         Another workaround is create new project with github repository and change branch from main to dev in settings.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I use Firebase for auth of my NextJS application that is deployed on Vercel. Now for every preview link that is generated by pull requests, I need to add the new domain to the auth section of the Firebase console otherwise this is the error I get:
And auth actions cannot be performed. Is there any way to automatically add the preview domains from Vercel to the Firebase auth domain list?
Now I know that we can add custom domains to the authorized domains list on firebase but how do you automate that for something like Vercel preview links where you will have a new preview link for every PR or re-deployment?
Beta Was this translation helpful? Give feedback.
All reactions