mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
fixed auth middleware
This commit is contained in:
@@ -276,6 +276,10 @@ export class AppAuth extends Module<typeof authConfigSchema> {
|
||||
}
|
||||
|
||||
async createUser({ email, password, ...additional }: CreateUserPayload): Promise<DB["users"]> {
|
||||
if (!this.enabled) {
|
||||
throw new Error("Cannot create user, auth not enabled");
|
||||
}
|
||||
|
||||
const strategy = "password";
|
||||
const pw = this.authenticator.strategy(strategy) as PasswordStrategy;
|
||||
const strategy_value = await pw.hash(password);
|
||||
|
||||
Reference in New Issue
Block a user