Skip to main content
Version: 2.0.0

Type alias: Authenticator<UserType>

Ƭ Authenticator<UserType>: ({ user }: { authController: AuthController<UserType> ; dataSource: DataSource ; storageSource: StorageSource ; user: UserType | null }) => boolean | Promise<boolean>

Type parameters

NameType
UserTypeextends User = User

Type declaration

▸ ({ user }): boolean | Promise<boolean>

Implement this function to allow access to specific users. You might also want to load additional data for a user asynchronously and store it using the setExtra method in the authController.

Parameters
NameTypeDescription
{ user }Object-
{ user }.authControllerAuthController<UserType>AuthController
{ user }.dataSourceDataSourceConnector to your database, e.g. your Firestore database
{ user }.storageSourceStorageSourceUsed storage implementation
{ user }.userUserType | nullLogged in user or null
Returns

boolean | Promise<boolean>

Defined in

lib/src/firebase_app/types/auth.tsx:74

Enterprise or start-up?

Learn how to get the most out of your project with the help of our consulting team.
Learn more
Sign up to our newsletter to get the latest news and updates. No spam!