# 400 error after logging in through Auth0 page

**URL:** <https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042>\
**Category:** Get Help\
**Tags:** auth0, login\
**Created:** [January 12, 2023, 12:05pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042 "2023-01-12T12:05:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![imran.proco](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/imran.proco/32/42551_2.png) [@imran.proco](https://community.auth0.com/u/imran.proco)\
**Post date:** [January 12, 2023, 12:05pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/1 "2023-01-12T12:05:28Z")

</div>

I’ve set the auth0 athentication up in my Next.js app and deployed to vercel. It works on localhost as expected. However, on the live Vercel app, after selecting login from my webpage, it takes me to the auth0 login page, but after I login it gives me a blank page with a 400 GET error. The GET URL is `https://{my app}.vercel.app/api/auth/callback?` followed by code & state values.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [January 12, 2023, 7:43pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/3 "2023-01-12T19:43:30Z")

</div>

Hi @imran.proco ,

Welcome to the Auth0 Community!

> [@imran.proco](#):
>
> I’ve set the auth0 athentication up in my Next.js app and deployed to vercel. It works on localhost as expected. However, on the live Vercel app, after selecting login from my webpage, it takes me to the auth0 login page, but after I login it gives me a blank page with a 400 GET error. The GET URL is `https://{my app}.vercel.app/api/auth/callback?` followed by code & state values.

I am curious if you have followed the steps described in [this](https://github.com/auth0/nextjs-auth0/blob/main/examples/README.md) GitHub article to host your app on Vercel. And exactly which 400 GET error you received? I have not tried the steps yet. Ideally, they should work. If you are still receiving the same error, I will test this on my end and let you know.

---

<div class="post-metadata">

**Author:** ![imran.proco](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/imran.proco/32/42551_2.png) [@imran.proco](https://community.auth0.com/u/imran.proco)\
**Post date:** [January 13, 2023, 2:51pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/4 "2023-01-13T14:51:24Z")

</div>

Hi @lihua.zhang,

Thanks. I did follow those steps listed in the Github article. Please see the screenshot attached with the 400 error.

 ![Screenshot 2023-01-13 at 14.48.43](https://global.discourse-cdn.com/auth0/original/3X/4/4/44d88abbfb3135940c55a5686fe166d7d309783a.png)

---

<div class="post-metadata">

**Author:** ![lsanchezs](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lsanchezs](https://community.auth0.com/u/lsanchezs)\
**Post date:** [February 7, 2023, 8:15pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/5 "2023-02-07T20:15:56Z")

</div>

Hello @imran.proco, Did you fix it?, I’m facing the same issue.

---

<div class="post-metadata">

**Author:** ![imran.proco](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/imran.proco/32/42551_2.png) [@imran.proco](https://community.auth0.com/u/imran.proco)\
**Post date:** [March 22, 2023, 2:11pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/7 "2023-03-22T14:11:42Z")

</div>

Hi,  
I resolved it by creating a new app on Auth0 specifically for the live URL and it works.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 26, 2024, 7:28pm UTC](https://community.auth0.com/t/400-error-after-logging-in-through-auth0-page/98042/8 "2024-11-26T19:28:07Z")

</div>

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