Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / auth / isAuthSessionTokenValid

Function: isAuthSessionTokenValid()

isAuthSessionTokenValid(session, requiredScopes, expiryBufferSec, requiredClientId?): boolean

Defined in: packages/b2c-tooling-sdk/src/auth/session-store.ts:275

Returns true if the session's access token is present, decodes as a JWT, has not expired (with a small buffer), and (optionally) satisfies the given scope and clientId requirements. No network calls.

Parameters

session

AuthSession

requiredScopes

string[] = []

expiryBufferSec

number = DEFAULT_EXPIRY_BUFFER_SEC

requiredClientId?

string

Returns

boolean

Released under the Apache-2.0 License.