MonoCloud Authentication SDK
    Preparing search index...

    Interface MonoCloudAuth

    The current authentication state and the authentication actions.

    interface MonoCloudAuth {
        error?: Error;
        getTokens: (options?: GetTokensOptions) => Promise<MonoCloudTokens>;
        isAuthenticated: boolean;
        isLoading: boolean;
        refetchUserInfo: () => Promise<void>;
        refreshSession: (refreshOptions?: RefreshOptions) => Promise<void>;
        session?: MonoCloudSession;
        signIn: (signInOptions?: SignInOptions) => Promise<void>;
        signInSilent: (
            signInSilentOptions?: SignInSilentOptions,
        ) => Promise<MonoCloudSession>;
        signOut: (signOutOptions?: SignOutOptions) => Promise<void>;
        user?: MonoCloudUser;
    }

    Hierarchy

    Index

    Properties

    error?: Error

    Error encountered during authentication, if any.

    getTokens: (options?: GetTokensOptions) => Promise<MonoCloudTokens>

    Retrieves the active tokens, refreshing them if they have expired.

    isAuthenticated: boolean

    Flag indicating if the user is authenticated.

    isLoading: boolean

    Flag indicating if the authentication state is still loading.

    refetchUserInfo: () => Promise<void>

    Refetches the user's profile from the UserInfo endpoint and updates the session.

    refreshSession: (refreshOptions?: RefreshOptions) => Promise<void>

    Refreshes the current session using the Refresh Token Grant.

    The current session, including tokens and the user, if available.

    signIn: (signInOptions?: SignInOptions) => Promise<void>

    Initiates the sign-in flow.

    signInSilent: (
        signInSilentOptions?: SignInSilentOptions,
    ) => Promise<MonoCloudSession>

    Attempts to silently restore the session via a hidden iframe (prompt=none).

    signOut: (signOutOptions?: SignOutOptions) => Promise<void>

    Initiates the sign-out flow.

    The authenticated user's information, if available.