Type alias: Authenticator<UserType>
Ƭ Authenticator<UserType
>: ({ user }
: { authController
: AuthController
<UserType
> ; dataSource
: DataSource
; storageSource
: StorageSource
; user
: UserType
| null
}) => boolean
| Promise
<boolean
>
Type parameters
Name | Type |
---|---|
UserType | extends 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
Name | Type | Description |
---|---|---|
{ user } | Object | - |
{ user }.authController | AuthController <UserType > | AuthController |
{ user }.dataSource | DataSource | Connector to your database, e.g. your Firestore database |
{ user }.storageSource | StorageSource | Used storage implementation |
{ user }.user | UserType | null | Logged in user or null |
Returns
boolean
| Promise
<boolean
>