# Why the configuration to set the token expired time(for re fetch of latest token) is only on DEV mode?(okta-auth-js)

**URL:** <https://devforum.okta.com/t/why-the-configuration-to-set-the-token-expired-time-for-re-fetch-of-latest-token-is-only-on-dev-mode-okta-auth-js/26993>\
**Category:** Questions\
**Created:** [February 26, 2024, 11:09am UTC](https://devforum.okta.com/t/why-the-configuration-to-set-the-token-expired-time-for-re-fetch-of-latest-token-is-only-on-dev-mode-okta-auth-js/26993 "2024-02-26T11:09:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jas1](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jas1](https://devforum.okta.com/u/Jas1)\
**Post date:** [February 26, 2024, 11:09am UTC](https://devforum.okta.com/t/why-the-configuration-to-set-the-token-expired-time-for-re-fetch-of-latest-token-is-only-on-dev-mode-okta-auth-js/26993/1 "2024-02-26T11:09:06Z")

</div>

We have use case in which we would like to expire the token earlier than the configured time.  
Currently, as per okta SDK - okta-auth-js [okta/okta-auth-js: The official js wrapper around Okta’s auth API (github.com)](https://github.com/okta/okta-auth-js)  
tokens are considered expired 30 seconds before actual expiration time and can be configured to different value only for development purpose. Will this feature be available for production application?

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [February 26, 2024, 8:24pm UTC](https://devforum.okta.com/t/why-the-configuration-to-set-the-token-expired-time-for-re-fetch-of-latest-token-is-only-on-dev-mode-okta-auth-js/26993/2 "2024-02-26T20:24:48Z")

</div>

Hi @Jas1! You are correct, and this is configurable for development purposes here - [GitHub - okta/okta-auth-js: The official js wrapper around Okta's auth API](https://github.com/okta/okta-auth-js?tab=readme-ov-file#expireearlyseconds) but not in production because the SDK needs a valid access token to obtain new ones (hard-capped at 30 seconds).

You may want to share your use case on our [Ideas Page](https://support.okta.com/help/s/article/Okta-Ideas-Step-by-Step-Guide?language=en_US) so that others in our dev community can vote on it and our SDK team can consider it.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [March 27, 2024, 8:24pm UTC](https://devforum.okta.com/t/why-the-configuration-to-set-the-token-expired-time-for-re-fetch-of-latest-token-is-only-on-dev-mode-okta-auth-js/26993/3 "2024-03-27T20:24:48Z")

</div>

Closed on March 27, 2024, 8:24pm UTC

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