# SPA application id token expiry/life time related question

**URL:** <https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879>\
**Category:** Get Help\
**Tags:** other, test\
**Created:** [April 17, 2023, 3:37pm UTC](https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879 "2023-04-17T15:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthil.kandasamy](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@senthil.kandasamy](https://community.auth0.com/u/senthil.kandasamy)\
**Post date:** [April 17, 2023, 3:37pm UTC](https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879/1 "2023-04-17T15:37:26Z")

</div>

Hi,  
I’m trying to reduce id token expiry/life time for our application (Single page application) configuration.  
Following the documentation links, I changed the values under application’s “settings” tab in the portal to 1800 seconds (30 minutes).

 ![id_expiration](https://global.discourse-cdn.com/auth0/original/3X/9/2/92c44b93b5b1397c850f8af7539a7849d763b175.png)

After allowing few minutes, when I try to run our front end app and observe the token, it shows the expiry life time is 24 hours (and not the 30 minutes I wanted). Below is the token value

“iat”: 1681745041,  
“exp”: 1681831441 (i.e 18 Apr 2023 16:24 GMT)

Could you please let me know if I’m missing any setting (or) configuration incorrect?

---

<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:** [April 17, 2023, 9:00pm UTC](https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879/3 "2023-04-17T21:00:16Z")

</div>

Hello @senthil.kandasamy welcome to the community!

> [@senthil.kandasamy](#):
>
> After allowing few minutes, when I try to run our front end app and observe the token, it shows the expiry life time is 24 hours (and not the 30 minutes I wanted). Below is the token value
> 
> “iat”: 1681745041,  
> “exp”: 1681831441 (i.e 18 Apr 2023 16:24 GMT)
> 
> Could you please let me know if I’m missing any setting (or) configuration incorrect?

The configuration looks correct (thanks for the screenshot!) - Are you positive you are adjusting the setting for the correct app and looking at the ID token rather than the access token?

Keep us posted!

---

<div class="post-metadata">

**Author:** ![senthil.kandasamy](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@senthil.kandasamy](https://community.auth0.com/u/senthil.kandasamy)\
**Post date:** [April 20, 2023, 8:50pm UTC](https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879/4 "2023-04-20T20:50:19Z")

</div>

Hi tyf,  
Thank you for the suggestions. You were right, indeed we had two set of configurations one for the SPA (hence Auth0 SPA) and a backend service (Auth0 API configuration) that requires access token for authorisation. I was looking at the access token expiration value which wasn’t matching.

May I ask one more question. Our team requires user session/browser timeout to be configured as different values for different types of roles (Admin, Reader etc). May I ask if that is possible to achieve (Set different timeout values based on user roles)?

---

<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:** [May 4, 2023, 8:50pm UTC](https://community.auth0.com/t/spa-application-id-token-expiry-life-time-related-question/104879/5 "2023-05-04T20:50:37Z")

</div>

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