# getAccessTokenSilently Auth0 Session TTL

**URL:** <https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219>\
**Category:** JWT.io\
**Tags:** spa, jwt\
**Created:** [August 22, 2022, 10:37pm UTC](https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219 "2022-08-22T22:37:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe.a](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.a/32/35942_2.png) [@joe.a](https://community.auth0.com/u/joe.a)\
**Post date:** [August 22, 2022, 10:37pm UTC](https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219/1 "2022-08-22T22:37:08Z")

</div>

The function `getAccessTokenSilently` has the option to `ignoreCache`  
[https://auth0.github.io/auth0-spa-js/interfaces/gettokensilentlyoptions.html#ignorecache](https://auth0.github.io/auth0-spa-js/interfaces/gettokensilentlyoptions.html#ignorecache)

What is the TTL of this cache on the auth0 side, and is there a way to change it?

I’m asking because in the use case of a SPA using SSO within the context of the host site, if the host site is logged out there is potential for the SPA to still have the original access if a different user logs into the host site and I’d like to disable or make this cache as small as possible.

Thanks!

---

<div class="post-metadata">

**Author:** ![joe.a](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.a/32/35942_2.png) [@joe.a](https://community.auth0.com/u/joe.a)\
**Post date:** [August 23, 2022, 4:42am UTC](https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219/2 "2022-08-23T04:42:00Z")

</div>

I think the cache is referring to the auth0 session described here:

> **[Non-Persistent Sessions](https://auth0.com/docs/manage-users/sessions/non-persistent-sessions)**
>
> Describes non-persistent sessions available with Auth0.

I am still wondering what the best way to handle a logout from a host site would be. We can try the federated logout, but are there any other ideas?

---

<div class="post-metadata">

**Author:** ![rob.ertso.nldspj11](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rob.ertso.nldspj11/32/12835_2.png) [@rob.ertso.nldspj11](https://community.auth0.com/u/rob.ertso.nldspj11)\
**Post date:** [August 23, 2022, 5:53am UTC](https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219/3 "2022-08-23T05:53:13Z")

</div>

Thank you for the explanation. It is clear for me. [LTDCommodities](https://www.ltdcommodities.me/)

---

<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:** [November 19, 2024, 11:02pm UTC](https://community.auth0.com/t/getaccesstokensilently-auth0-session-ttl/89219/4 "2024-11-19T23:02:05Z")

</div>

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