Skip to main content

Overview

useSignOutAll signs out every stored account simultaneously. It sends a sign-out request for each account’s refresh token (best-effort — failures are logged but do not block the operation), then clears all local auth state.

Usage Example

import { useSignOutAll } from "@replyke/react-js";

function SignOutAllButton() {
  const { signOutAll } = useSignOutAll();

  const handleClick = async () => {
    try {
      await signOutAll();
    } catch (err) {
      console.error("Sign out failed:", err);
    }
  };

  return <button onClick={handleClick}>Sign Out All Accounts</button>;
}

Returns

signOutAll
function
Async function that signs out all accounts. Sends a server-side sign-out request for each stored refresh token, clears the accounts map, resets auth state, and resets the API cache. Throws if the operation fails at the Redux thunk level.

Integration Guide

For multi-account integration guidance, see Multi-Account.