Skip to main content

UseAuth

Provides access to the AuthContext which contains information about the active channel.

Signature

Provides information about the current user & their authentication & authorization status.

Signature

status

property'initial' | 'authenticated' | 'verifying' | 'unauthenticated'

The status of the authentication.

authenticationError

propertystring

The error message if the authentication fails.

isAuthenticated

propertyboolean

Whether the user is authenticated.

login

property(username: string, password: string, onSuccess?: () => void) => void

The function to login the user.

logout

property(onSuccess?: () => void) => Promise<void>

The function to logout the user.

user

propertyResultOf<typeof CurrentUserQuery>['activeAdministrator'] | undefined

The user object.

channels

propertyNonNullable<ResultOf<typeof CurrentUserQuery>['me']>['channels'] | undefined

The channels object.

refreshCurrentUser

property() => void

The function to refresh the current user.

Was this chapter helpful?
Report Issue
Edited Feb 10, 2026ยทEdit this page