Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 895 Bytes

File metadata and controls

38 lines (26 loc) · 895 Bytes
code type title description
true
page
checkToken
Checks a JWT's validity.

checkToken

Checks a token validity.

If no token is provided, the SDK checks its internal authentication token.


checkToken([token]);

Property Type Description
token
string
Optional authentication token

Resolves

An object representing the token validity status

Name Type Description
valid
boolean
Tell if the token is valid or not
state
string
Explain why the token is invalid
 expires_at
number
Token expiration timestamp

Usage

<<< ./snippets/check-token.js