Sanity Library Reference Docs
    Preparing search index...

    Variable logoutConst

    logout: BoundStoreAction<AuthStoreState, [], Promise<void>> = ...

    Logs the current user out. In OAuth mode this revokes the OAuth tokens instead of calling the legacy /auth/logout endpoint; revocation is best-effort, so the OAuth path resolves even if the revoke request fails, whereas the legacy path rejects when /auth/logout fails. Local state and storage are cleared in both cases.