checkUrlFragment
client.checkUrlFragment( // Optional arguments url: string )
About this command
Checks whether the URL contains a success (AuthResult
) or failure (ErrorResponse
) response.
If a response is detected, the method returns true
and emits the:
-
authenticated
event when there is a successful authentication result. -
authentication_failure
event when there is an error response.
Examples
const responseDetected = client.checkUrlFragment()
if (responseDetected) {
// The `authenticated` event is fired
} else {
// The `authentication_failure` event is fired
}