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:
-
authenticatedevent when there is a successful authentication result. -
authentication_failureevent 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
}