Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

function useIsSignedIn(): {
  isSignedIn: boolean;
};
Hook to check if a user is currently signed in. Use this to gate authenticated-only features in your application.

Returns

{
  isSignedIn: boolean;
}
NameType
isSignedInboolean

Example

function AuthGuard({ children }) {
  const { isSignedIn } = useIsSignedIn();

  if (!isSignedIn) {
    return <Navigate to="/sign-in" />;
  }

  return children;
}