# Getting id\_token not present in TokenSet on logout

**URL:** <https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238>\
**Category:** Get Help\
**Tags:** logout, auth0\
**Created:** [June 30, 2022, 12:05pm UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238 "2022-06-30T12:05:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikehajj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mikehajj/32/38500_2.png) [@mikehajj](https://community.auth0.com/u/mikehajj)\
**Post date:** [June 30, 2022, 12:05pm UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238/1 "2022-06-30T12:05:14Z")

</div>

I followed the Node.js (Express) instructions under application / quickstart and got my first auth0 app using express working.

```auto
const { auth } = require( 'express-openid-connect' );
app.use( auth( {
		               authRequired: false,
		               auth0Logout: true,
		               baseURL: 'http://mydomain.local',
		               clientID: configuration.auth0.clientID,
		               secret: configuration.auth0.secret,
		               issuerBaseURL: 'https://xxxxxx'
	               } ) );

```

the express app runs on localhost:3000 and everything works when baseURL is set to `http://localhost:3000`.

Then I created an Nginx reverse proxy for it so that `https://mydomain.local` proxies to`http://localhost:3000`and changed baseURL to `https://mydomain.local`.

my current problem is that when in my browser i open `https://mydomain.local/logout`, i get an error:

```auto
{
"code": 500,
"message": "id_token not present in TokenSet"
}

```

On the auth0 management dashboard i have both domains configured as:  
**Allowed Callback URLs:**  
[http://localhost:3000/callback](http://localhost:3000/callback), [https://mydomain.local/callback](https://mydomain.local/callback)

**Allowed Logout URLs**

```auto
http://localhost:3000/, https://mydomain.local/

```

**Allowed Web Origins**

```auto
http://localhost:3000, https://mydomain.local

```

**Allowed Origins (CORS)**

```auto
http://localhost:3000, https://mydomain.local

```

Does anybody know what am i missing here or what did i do wrong ?

- SDK Version: express-openid-connect@2.7.2

---

<div class="post-metadata">

**Author:** ![mikehajj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mikehajj/32/38500_2.png) [@mikehajj](https://community.auth0.com/u/mikehajj)\
**Post date:** [July 1, 2022, 6:45am UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238/3 "2022-07-01T06:45:47Z")

</div>

not yet. been battling with this all day yesterday and today is round 2 😃

---

<div class="post-metadata">

**Author:** ![mikehajj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mikehajj/32/38500_2.png) [@mikehajj](https://community.auth0.com/u/mikehajj)\
**Post date:** [July 1, 2022, 10:53am UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238/4 "2022-07-01T10:53:52Z")

</div>

I figured out what was happening after adding some debug log messages in the dependency “express-openid-connect” and noticed that the main reason has nothing to do with the SDK or even auth0.

I had a typo in the nginx route configuration and I never saw it up until I added the debug messages.

fixing the typo in the nginx configuration solved the problem for me. All the stuff I added in the code sample above are correct and working properly.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 1, 2022, 5:57pm UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238/5 "2022-07-01T17:57:43Z")

</div>

Hey @mikehajj good to know you sorted this out, and thanks a bunch for following up here as well! 😄

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 16, 2022, 5:58pm UTC](https://community.auth0.com/t/getting-id-token-not-present-in-tokenset-on-logout/86238/6 "2022-07-16T17:58:06Z")

</div>

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