<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language

Okta Auth JS Version 8.0.0 Does Not Decode Access Tokens By Default

Okta Identity Engine
SDKs & Libraries

Overview

Starting with okta-auth-js version 8.0.0, Okta does not decode access tokens by default. This change aligns with the OAuth 2.0 specification, which dictates that clients treat access tokens as opaque strings. Enable the decodeAccessTokens flag in the configuration to restore the previous behavior.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • okta-auth-js version 8.0.0 and later

Cause

This change aligns with the OAuth 2.0 specification, which dictates that clients treat access tokens as opaque strings.

Solution

Why does Okta treat access tokens as opaque strings?

Per the OAuth 2.0 specification, clients treat access tokens as opaque tokens. Authorization servers implement access tokens as either a truly opaque token or a JSON Web Token (JWT). Resource servers use tools such as jwt-verifier to decode access tokens, but clients like okta-auth-js do not require this functionality. Okta implemented this change to encourage patterns that align with the OAuth 2.0 specification.

 

Configure the decodeAccessTokens flag

If required for an integration, developers can avoid disruption and decode access tokens by setting a specific flag in the library's configuration.

Enable the decoding of access tokens by adding the following flag to the configuration object for OktaAuth:

decodeAccessTokens: true

 

Related References

Loading
Okta Auth JS Version 8.0.0 Does Not Decode Access Tokens By Default | Okta Support