We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export interface AdminModuleOptions { adminBroOptions: AdminBroOptions; auth?: { authenticate: (email: string, password: string) => Promise<CurrentAdmin>; // here cookiePassword: string; cookieName: string; }; formidableOptions?: ExpressFormidableOptions; sessionOptions?: SessionOptions; }
There is no documented way to reject the authentication.
From a few issue discussions, I've seen empirically that return false is the way to reject the authentication. Therefore the typing should be:
return false
(email: string, password: string) => Promise<CurrentAdmin | false>
Throwing a JS error within the authenticate function would be preferable, but the promise rejection is not handled and crashes the server instead.
authenticate
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is no documented way to reject the authentication.
From a few issue discussions, I've seen empirically that
return false
is the way to reject the authentication.Therefore the typing should be:
Throwing a JS error within the
authenticate
function would be preferable, but the promise rejection is not handled and crashes the server instead.The text was updated successfully, but these errors were encountered: