Sign in

Type: MonoCloudAuth

The current authentication state and the authentication actions.

Extends

Properties

PropertyTypeDescription
error?ErrorError encountered during authentication, if any.
getTokens(options?: GetTokensOptions) => Promise<MonoCloudTokens>Retrieves the active tokens, refreshing them if they have expired.
isAuthenticatedbooleanFlag indicating if the user is authenticated.
isLoadingbooleanFlag 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.
session?MonoCloudSessionThe 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.
user?MonoCloudUserThe authenticated user's information, if available.
© 2024 MonoCloud. All rights reserved.