# How to give Access token a longer exp time?

**URL:** <https://community.auth0.com/t/how-to-give-access-token-a-longer-exp-time/90721>\
**Category:** Get Help\
**Tags:** nextjs\
**Created:** [September 15, 2022, 5:42pm UTC](https://community.auth0.com/t/how-to-give-access-token-a-longer-exp-time/90721 "2022-09-15T17:42:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nacho](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nacho/32/12799_2.png) [@nacho](https://community.auth0.com/u/nacho)\
**Post date:** [September 15, 2022, 5:42pm UTC](https://community.auth0.com/t/how-to-give-access-token-a-longer-exp-time/90721/1 "2022-09-15T17:42:22Z")

</div>

In our NextJS app (with next-auth library), the user session is good for 30 days. However, the API access token is only valid for 24 hours.

Where in Auth0 Dashboard can I change API token expiration? “ **Token expiration for browser flows** ” won’t let me set a value more than 86,400 (24 hrs).

 ![Screen Shot 2022-09-15 at 7.34.24 PM](https://global.discourse-cdn.com/auth0/original/3X/8/c/8c453194c32318f62da6608d6e34174b2006f654.png)

---

<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:** [September 15, 2022, 6:45pm UTC](https://community.auth0.com/t/how-to-give-access-token-a-longer-exp-time/90721/3 "2022-09-15T18:45:29Z")

</div>

Hey there @nacho!

24 hours is the max and can’t be changed - Please note that this only applies to implicit or hybrid flows as outlined [here](https://auth0.com/docs/secure/tokens/access-tokens/update-access-token-lifetime).

> The **Token Expiration For Browser Flows (Seconds)** field refers to access tokens issued for the API via implicit and hybrid flows and does not cover all flows initiated from browsers. For example, the PKCE flow (used in auth0-js-spa SDK) can be initiated from the browser, but it refers to the **Token Expiration** not the **Token Expiration For Browser Flows** value.

---

<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:** [September 30, 2022, 6:15am UTC](https://community.auth0.com/t/how-to-give-access-token-a-longer-exp-time/90721/5 "2022-09-30T06:15:04Z")

</div>

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