My application is redirecting to Vercel login

My application is deployed perfectly in its main branch on the domain path. Now with the subdomain, in a development environment, for some reason that I don’t know, it redirects to the Vercel login. I have seen some users with the same problem. Any suggestions?

Thanks

My app dev is https://dev.komuni.care

Hi, @damianlluch! Welcome to the Vercel Community :smile:

Appreciate the detail in your post. Sounds like a bug! Can you try out the following:

  1. Double-check your subdomain setup in your Vercel project settings, under “Domains”
  2. Take a look at your environment variables. Sometimes they can cause surprise redirects.
  3. Verify that your development branch is correctly set up for deployment. In your Vercel project settings, go to the “Git” section and ensure that the branch you’re using for development is configured for deployment.
  4. Vercel offers a feature called Deployment Protection, which can sometimes cause redirects to login pages. Check if this feature is enabled for your development deployments and consider adjusting its settings if necessary.
  5. If you’re using a custom server setup (e.g., with Express.js), ensure that your server code isn’t inadvertently causing this redirect.
  6. Try comparing your main and development deployment settings.
  7. Deployment logs can have some clues about what’s going on! Can you share any with us?

Let us know if you need any more help figuring it out. :blush:

We have done some more research. And the error occurs after a push is made, after the subdomain we use for dev is linked.
That is, if we create the binding between the X branch and the subdomain. There it works, but then, if you make some minimal change, the project breaks, and it produces what I indicated in the previous message.
Are we obliged to create a new project for the dev branch? can’t we just link a branch to connect it to the subdomain within the main project?

Thanks

Hi @damianlluch,

Taking a further look, this appears to be Vercel’s Deployment Protection / Vercel Authentication.
The default is to protect every non-production deployment by adding an additional authentication layer.

Once you’re logged in to your Vercel Account (and all of your team members as well), you should see the Authentication... screen for a short period of time and then immediately be redirected to the actual deployment.

You can disable Vercel Authentication for your preview deployments, or you can alternatively generate sharable links, which you can share with people outside your team to access the deployment.

You can find the Vercel Authentication settings here and the documentation for Vercel Authentication here.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.