# Not receiving ID token in the redirected response URL

**URL:** <https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [December 7, 2022, 3:07am UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863 "2022-12-07T03:07:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivekmanu4343](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vivekmanu4343/32/41681_2.png) [@vivekmanu4343](https://community.auth0.com/u/vivekmanu4343)\
**Post date:** [December 7, 2022, 3:07am UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863/1 "2022-12-07T03:07:29Z")

</div>

Hi,

I have been trying to use auth0-js to solve a few of my sign-up and login flow requirements. I was trying to do login using the below code snippet which authenticates and redirect back with access\_token in response redirect URL but, I’m not sure about 2 things here.

1. Why I’m not receiving the ID\_Token as part of the response URL?
2. Who has to manage the session? Should I manage it on my own or Auth0 will set the session?

My login code snippet for ref:  
export const auth = new auth0.WebAuth({  
clientID: AUTH0\_CLIENT\_ID,  
domain: AUTH0\_DOMAIN,  
scope: “openid email profile”  
})

auth.login({  
username: user.email,  
password: user.password,  
realm: “‘Username-Password-Authentication’”,  
redirectUri: AUTH0\_LOGIN\_REDIRECT\_URI,  
responseType: “token”,  
nonce: “1234567”,  
state: “1234567”  
}

Sample redirect response: [https://localhost:3000/authenticate#access\_token=“{some\_token}”&scope=openid%20profile%20email&expires\_in=7200&token\_type=Bearer&state=1234567](https://localhost:3000/authenticate#access_token=%22%7Bsome_token%7D%22&scope=openid%20profile%20email&expires_in=7200&token_type=Bearer&state=1234567)

Thanks,  
Vivek P N

---

<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:** [December 7, 2022, 11:43pm UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863/3 "2022-12-07T23:43:25Z")

</div>

Hey there @vivekmanu4343!

1. The `responseType` will need to include `id_token` in addition to `token` as is documented [here](https://auth0.com/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-implicit-flow#oidc-conformant).

2. It depends on your particular use case and which session you are referring to - Please see our documentation on sessions [here](https://auth0.com/docs/manage-users/sessions).

---

<div class="post-metadata">

**Author:** ![vivekmanu4343](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vivekmanu4343/32/41681_2.png) [@vivekmanu4343](https://community.auth0.com/u/vivekmanu4343)\
**Post date:** [December 8, 2022, 6:07am UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863/4 "2022-12-08T06:07:01Z")

</div>

Thanks for the update.

The session which I’m referring to is the application session which is set by Auth0. In case of login flow with auth-js, I don’t see the session being set so, how do I handle the session?

---

<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:** [January 25, 2023, 1:28am UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863/5 "2023-01-25T01:28:12Z")

</div>

Hey there @vivekmanu4343 I apologize for the delayed response, but wanted to get back to you on this one.

> [@vivekmanu4343](#):
>
> The session which I’m referring to is the application session which is set by Auth0. In case of login flow with auth-js, I don’t see the session being set so, how do I handle the session?

It really depends on your use case, but perhaps the following blog post will help with possible approaches:

> **[Best Practices for Application Session Management](https://auth0.com/blog/application-session-management-best-practices/)**
>
> Let's see how to maintain application sessions in different scenarios

---

<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:** [March 9, 2023, 1:24am UTC](https://community.auth0.com/t/not-receiving-id-token-in-the-redirected-response-url/95863/6 "2023-03-09T01:24:09Z")

</div>

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