revoke

abstract suspend fun revoke(): SessionsRevokeResponse

Revokes the current session, signing the user out on the backend and clearing local session state. Calls the POST /sdk/v1/sessions/revoke endpoint.

Kotlin:

StytchConsumer.sessions.revoke()

iOS:

let response = try await StytchConsumer.sessions.revoke()

React Native:

StytchConsumer.sessions.revoke()

Return

SessionsRevokeResponse confirming the session was revoked.

Throws

StytchError

if the request fails.

if the coroutine is cancelled.