Skip to main content

Using the Stytch SDK

1

Using sessions.revoke()

The sessions.revoke() method clears the user and session objects from local storage unless the SDK cannot contact the Stytch servers.

Example

export const logout = () => {
    stytch.session.revoke();
};
We recommend showing users a list of all their active sessions so they can revoke any unrecognized session by IP address or user agent.Use custom claims to attach values to the User Session object via the session_custom_claims parameter.