checkSession
This SDK is deprecated in favor of the Core and UI JS SDKs. See Migrating to the latest SDKs to use the latest Core and UI SDKs.
Support for the Legacy JS SDK ends on 28 February, 2021. |
About this command
Check if an SSO session is active, and if so, authenticate the current user silently and return an Authentication Result object.
If no valid session is present, an error object is returned with a login_required error key.
Examples
reach5('checkSession', {
nonce: 'abcd' // The nonce links the retrieved id token with the local session
}, function (err, authResult) {
if (err) {
if (err.error === 'login_required') {
// No active session
} else {
// Unexpected error
console.error(err)
}
} else {
// Authenticate the current user locally
}
});
Parameters
List of authentication options
|
|||||||||||||||||||||||||
Event callback that was used with on. |