feat(otp): use dedicated method to get user's otp secret
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
238dead666
commit
4f8ebc7dd9
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ const route: FastifyPluginAsync = async (fastify, _opts): Promise<void> => {
|
||||||
return makeResponse("failed", "otp.failed.timeout");
|
return makeResponse("failed", "otp.failed.timeout");
|
||||||
|
|
||||||
// get the Otp sercret from the db
|
// get the Otp sercret from the db
|
||||||
let otpSecret = this.db.getUserFromName(dJwt.who)?.otp;
|
let otpSecret = this.db.getUserOtpSecret(dJwt.who);
|
||||||
if (isNullish(otpSecret))
|
if (isNullish(otpSecret))
|
||||||
// oops, either no user, or user without otpSecret
|
// oops, either no user, or user without otpSecret
|
||||||
// fuck off
|
// fuck off
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue