Skip to main content
Version: 2.0.0-alpha

Interface: AuthController<UserType>

Controller for retrieving the logged user or performing auth related operations

Type parameters

NameType
UserTypeextends User = User

Properties

authDelegate

authDelegate: AuthDelegate<UserType>

Delegate in charge of connecting to a backend and performing the auth operations.

Defined in

lib/src/models/auth.tsx:68


authLoading

authLoading: boolean

If you have defined an Authenticator, this flag will be set to true while it loads

Defined in

lib/src/models/auth.tsx:37


canAccessMainView

canAccessMainView: boolean

Has the user completed the steps to access the main view, after the login screen

Defined in

lib/src/models/auth.tsx:24


extra

Optional Readonly extra: any

Utility field you can use to store your custom data. e.g: Additional user data fetched from a Firestore document, or custom claims

Defined in

lib/src/models/auth.tsx:54


initialLoading

initialLoading: boolean

Initial loading flag. It is used not to display the login screen when the app first loads, and it has not been checked whether the user is logged in or not.

Defined in

lib/src/models/auth.tsx:31


loginSkipped

Optional loginSkipped: boolean

Has the user skipped the login process

Defined in

lib/src/models/auth.tsx:18


notAllowedError

notAllowedError: any

The current user was not allowed access

Defined in

lib/src/models/auth.tsx:42


user

user: null | UserType

The user currently logged in The values can be: the user object, null if they skipped login

Defined in

lib/src/models/auth.tsx:13

Methods

setExtra

setExtra(extra): void

You can use this method to store any extra data you would like to associate your user to. e.g: Additional user data fetched from a Firestore document, or custom claims

Parameters

NameType
extraany

Returns

void

Defined in

lib/src/models/auth.tsx:62


signOut

signOut(): void

Sign out

Returns

void

Defined in

lib/src/models/auth.tsx:47