# Receiving "Bad Request" page after user authenticates

**URL:** <https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359>\
**Category:** Get Help\
**Created:** [December 6, 2021, 10:41pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359 "2021-12-06T22:41:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 6, 2021, 10:41pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/1 "2021-12-06T22:41:02Z")

</div>

My call back URL is https://.com/callback, and when my users authenticate I get a ‘Bad Request’ string on the page. If one goes to the URL and deletes /callback it then redirects them to my application home page.

I have tried editing my call back URL to https://.com/ and then I recieve and error that says, “https://\<[Give yourself a better website » MY DOMAIN](http://my-domain.com/callback)” isn’t included in the valid list of call back urls. Any ideas on what I am doing wrong? On my local host I do not get this error.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 9, 2021, 10:31pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/3 "2021-12-09T22:31:04Z")

</div>

Hi @michael16,  
Welcome to the Auth0 Community!

This sounds like some combination of callback URL mismatches. Can you please record a [HAR](https://auth0.com/docs/troubleshoot/guides/generate-har-files) of the failed transaction and send it to me in a DM?

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 22, 2021, 8:50pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/4 "2021-12-22T20:50:43Z")

</div>

I have the HAR file, not sure how to send it to you via DM, however.

\*\* UPDATE I have received the basic badge and am able to send messages now. I have sent you the HAR file via DM.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 22, 2021, 10:17pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/5 "2021-12-22T22:17:58Z")

</div>

@michael16,

Thanks, I’ll take a look at it tomorrow.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 5:44pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/6 "2021-12-23T17:44:31Z")

</div>

Hi @michael16,

There is some odd behavior in the HAR you sent me. Can you share how you’ve implemented auth0 in your application?

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 23, 2021, 6:04pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/7 "2021-12-23T18:04:18Z")

</div>

![auth0_config](https://global.discourse-cdn.com/auth0/original/3X/8/0/8071280ab15e85fa7573915674af018bcfa978d1.png)

 ![home_route](https://global.discourse-cdn.com/auth0/original/3X/2/4/2460837737b062d6beb8cf463d05e7506ddd59ba.png)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 6:25pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/8 "2021-12-23T18:25:08Z")

</div>

And what SDK/version?

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 23, 2021, 6:43pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/9 "2021-12-23T18:43:22Z")

</div>

My app is a node express server.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 6:57pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/10 "2021-12-23T18:57:50Z")

</div>

Let me know the auth module and version

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 23, 2021, 7:12pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/11 "2021-12-23T19:12:51Z")

</div>

“express-openid-connect”: “^2.5.2”,

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 7:30pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/12 "2021-12-23T19:30:30Z")

</div>

Can you try adding the module install code to your app file? Your app should be erroring out if this isn’t present.

```auto
const { auth } = require('express-openid-connect');

```

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 23, 2021, 7:40pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/13 "2021-12-23T19:40:54Z")

</div>

```auto
const { auth, requiresAuth } = require("express-openid-connect")

```

I do have this line of code at the top of my server.js file.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 23, 2021, 8:00pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/14 "2021-12-23T20:00:30Z")

</div>

Great. Everything else you shared looks standard to the node quickstart.

Is there anything else your app is doing? It looks like the profile is returned successfully. after the error.

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 23, 2021, 8:13pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/15 "2021-12-23T20:13:52Z")

</div>

I did follow the quick start guide and I do not get the bad request page when I run the app from my localhost.

My application does get the bad request page each time a new user logs in for the first time or a existing user logs in with a different client. After the user refreshes the page they no longer get the problem, granted they continue to use the same browser.

The other weird thing too is that you can’t simply use the refresh button, you have to manually place your cursor in the URL box and hit enter.

Here is a screen shot of what the browser shows after the first log in attempt. I have recreated the error in a incognito window.  
 ![bad_request](https://global.discourse-cdn.com/auth0/original/3X/e/5/e5dc8ece24aa5a5fc4df1fbbda9a8caa9724b8fd.png)

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [December 29, 2021, 5:36am UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/16 "2021-12-29T05:36:06Z")

</div>

Any more info on how I may resolve this issue? Thank you.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 5, 2022, 8:33pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/17 "2022-01-05T20:33:09Z")

</div>

> [@michael16](#):
>
> I did follow the quick start guide and I do not get the bad request page when I run the app from my localhost.

How have you deployed your app when you do get the error?

> [@michael16](#):
>
> The other weird thing too is that you can’t simply use the refresh button, you have to manually place your cursor in the URL box and hit enter.

This sounds like a browser specific issue. Have you tried to see if the error happens in other browsers?

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [January 5, 2022, 10:37pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/18 "2022-01-05T22:37:35Z")

</div>

My app is deployed from an EC2 instance on AWS.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 6, 2022, 3:00pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/19 "2022-01-06T15:00:27Z")

</div>

Have you tried to see if the error happens in other browsers?

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [January 11, 2022, 7:00pm UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/20 "2022-01-11T19:00:59Z")

</div>

Yes, the error occurs in chrome, brave, firefox and edge.

---

<div class="post-metadata">

**Author:** ![michael16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael16/32/33224_2.png) [@michael16](https://community.auth0.com/u/michael16)\
**Post date:** [January 12, 2022, 2:19am UTC](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359/21 "2022-01-12T02:19:42Z")

</div>

Ok, I’m not sure if I did anything, but now it looks like I don’t get the error in Firefox or Brave, but it continues in Edge and Chrome.

[Next page](https://community.auth0.com/t/receiving-bad-request-page-after-user-authenticates/74359.md?page=2)
