Skip to main content
Version: 1.0.0

Type alias: Authenticator<UserType>

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

Type parameters

UserTypeextends User = User

Type declaration

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

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

{ user }Object-
{ user }.authControllerAuthController<UserType>AuthController
{ user }.dataSourceDataSourceConnector to your database, e.g. your Firestore database
{ user }.dateTimeFormat?stringFormat of the dates in the CMS. Defaults to 'MMMM dd, yyyy, HH:mm:ss'
{ user }.locale?LocaleLocale of the CMS, currently only affecting dates
{ user }.storageSourceStorageSourceUsed storage implementation
{ user }.userUserType | nullLogged in user or null

boolean | Promise<boolean>

Defined in