skip to Main Content

I had a question in regarding to the NextJS app which uses cloud firestore and firebase authentication which is deployed using the vercel deployment and domain is also registered using vercel itself.

  • Deployment : Vercel
  • Domain : Vercel
  • Authentication : Firebase Authentication
  • Database: Cloud Firestore
  • Storage: Firebase Storage

I followed this document https://firebase.google.com/docs/auth/web/google-signin#expandable-4 but without firebase hosting and custom domain registration with firebase, I cannnot “Customizing the redirect domain for Google sign-inOn project creation”

Below configuration is not working

firebase config {
 authDomain: “customdomain.com”
}

I cannot change the domain to firebase hosting, because then I won”t be able to deploy using vercel.

Is there a way retain my vercel deployment and customise the redirect url while authenticating user.

2

Answers


  1. Firebase console> authentication > firebase console
    click the settings tab
    settings

    then select Authorised domains and add your ustom domain, if you’re unsure check the console firebase will usually tell you what domain is supposed to be added there for example mine looked like this

    project-banner-eta.vercel.app
    
    Login or Signup to reply.
  2. this way work for me also

    Firebase console> authentication > firebase console click the settings tab
    settings
    then select add domains
    this will pop out a domain box telling you to enter the domain name
    copy your domain name and paste it there and click add
    that it all. everything should be ok now

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search