revokeToken

abstract suspend fun revokeToken(deregisterDevice: Boolean): Result<Unit>

Revokes the current authorization token, preventing further operations until a new token is granted.

If a UserVerificationProvider is registered and returns a new token on the next challenge, the user is automatically re-authorized. No action occurs if Configuration.isUserVerificationRequired is false.

Return

Result.Success on successful revocation, or Result.Error on failure.

Parameters

deregisterDevice

When true, also deregisters the device from receiving push notifications.

Samples

// On user logout
coreClient.revokeToken(deregisterDevice = true)