Skip to content

Commit

Permalink
fix: make authentication function return type nullable. Closes #30. (#31
Browse files Browse the repository at this point in the history
  • Loading branch information
mkayander authored Nov 6, 2021
1 parent 7c6f40e commit 8eef495
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interfaces/admin-module-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ExpressFormidableOptions } from './express-formidable-options.interface

/**
* Options passed to nestjs module
*
*
* @memberof module:@adminjs/nestjs
* @alias AdminModuleOptions
*/
Expand All @@ -15,13 +15,13 @@ export type AdminModuleOptions = {
*/
adminJsOptions: AdminJSOptions,
/**
* Authentication options. When NOT provided, it will initialize AdminJS without login page and authorization function.
* Authentication options. When NOT provided, it will initialize AdminJS without login page and authorization function.
*/
auth?: {
/**
* verifies if given credentials are valid, therefore if user has access to Admin Panel
*/
authenticate: (email: string, password: string) => Promise<CurrentAdmin>,
authenticate: (email: string, password: string) => Promise<CurrentAdmin | null>,
cookiePassword: string,
cookieName: string,
}
Expand Down

0 comments on commit 8eef495

Please sign in to comment.