Skip to main content

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