# Id\_token not present in TokenSet

**URL:** <https://community.auth0.com/t/id-token-not-present-in-tokenset/63690>\
**Category:** Get Help\
**Created:** [June 1, 2021, 4:06pm UTC](https://community.auth0.com/t/id-token-not-present-in-tokenset/63690 "2021-06-01T16:06:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dolearning](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dolearning/32/12848_2.png) [@dolearning](https://community.auth0.com/u/dolearning)\
**Post date:** [June 1, 2021, 4:06pm UTC](https://community.auth0.com/t/id-token-not-present-in-tokenset/63690/1 "2021-06-01T16:06:47Z")

</div>

Hi!

I’m having a strange issue that isn’t occurring locally but is occurring when I deploy.

I’ve set my scope to be “openid profile” and this is working locally. I’ve got exactly the same env vars in my deployed instance.

I notice that when I login from my local deploy I see an authenticate prompt between Univeral Login and my application:

 ![Screenshot 2021-06-01 at 16.50.49](https://global.discourse-cdn.com/auth0/original/3X/3/0/30dce828167f556eb35708d97ebe8824c69ed712.png)

This doesn’t happen for me on the deployed version.

 ![Screenshot 2021-06-01 at 16.55.37](https://global.discourse-cdn.com/auth0/original/3X/b/7/b760a3361d9a050065d4666bd8aacf4dab610553.png)

I’m using Next.js and ‘@auth0/nextjs-auth0’ library. The error seems to be happening on the callback route. I am using a rule to enhance the profile with metadata and am sending state to Auth0 and checking it on the way back.

I’ve checked settings are the same, code is the same and connections are the same.

I’ve got this same basic architecture deployed for several applications and am struggling to work out what is wrong here.

Any help gratefully received!!

Kevin.

---

<div class="post-metadata">

**Author:** ![dolearning](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dolearning/32/12848_2.png) [@dolearning](https://community.auth0.com/u/dolearning)\
**Post date:** [June 2, 2021, 8:15am UTC](https://community.auth0.com/t/id-token-not-present-in-tokenset/63690/2 "2021-06-02T08:15:59Z")

</div>

This was totally me.

I figured the problem was to do with scope (and it was).

Locally, in my .env file I set the scope to “openid profile” because I wanted both of those scope available. In a .env file, it’s necessary to have the scopes for space separated values.

On Vercel, I kept the quotes which is what was breaking the flow. Instead of `"openid profile"`, I should have had `openid profile`. After some logging of the serverless functions I spotted my error.

Leaving this here for posterity (and to remind me of the problem in future!).

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 2, 2021, 8:29am UTC](https://community.auth0.com/t/id-token-not-present-in-tokenset/63690/3 "2021-06-02T08:29:35Z")

</div>

Glad you have figured it out and thanks for sharing it with the rest of community!

---

<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:** [June 17, 2021, 8:30am UTC](https://community.auth0.com/t/id-token-not-present-in-tokenset/63690/4 "2021-06-17T08:30:28Z")

</div>

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