Skip to main content
Version: 1.0.0

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

models/auth.tsx:70


authLoading

authLoading: boolean

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

Defined in

models/auth.tsx:39


canAccessMainView

canAccessMainView: boolean

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

Defined in

models/auth.tsx:26


extra

Optional 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

models/auth.tsx:56


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

models/auth.tsx:33


loginSkipped

Optional loginSkipped: boolean

Has the user skipped the login process

Defined in

models/auth.tsx:20


notAllowedError

notAllowedError: any

The current user was not allowed access

Defined in

models/auth.tsx:44


user

user: null | UserType

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

Defined in

models/auth.tsx:15

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

models/auth.tsx:64


signOut

signOut(): void

Sign out

Returns

void

Defined in

models/auth.tsx:49