Hook to get the auth status of the user connection with the River network.

Imports

import { useRiverAuthStatus } from '@river-build/react-sdk'

Definition

function useRiverAuthStatus(
  config?: ObservableConfig.FromObservable<AuthStatus>,
): {
    status: AuthStatus;
    isInitializing: boolean;
    isEvaluatingCredentials: boolean;
    isCredentialed: boolean;
    isConnectingToRiver: boolean;
    isConnectedToRiver: boolean;
    isDisconnected: boolean;
    isError: boolean;
}

Source: useRiverAuthStatus

Parameters

config

  • Type: ObservableConfig.FromObservable<AuthStatus>
  • Optional

Configuration options for the observable.

Return Type

An object containing the current AuthStatus status and boolean flags for each possible status.

{
    status: AuthStatus;
    isInitializing: boolean;
    isEvaluatingCredentials: boolean;
    isCredentialed: boolean;
    isConnectingToRiver: boolean;
    isConnectedToRiver: boolean;
    isDisconnected: boolean;
    isError: boolean;
}