code | type | title | description |
---|---|---|---|
true |
page |
checkToken |
Checks a JWT's validity. |
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 |
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 |
<<< ./snippets/check-token.js