perf: 双重验证显示secret

This commit is contained in:
xiaojunnuo
2026-02-06 23:26:57 +08:00
parent cbd8699801
commit febd6d32cf
4 changed files with 24 additions and 5 deletions

View File

@@ -48,8 +48,8 @@ export class UserTwoFactorSettingController extends BaseController {
@Post("/authenticator/qrcode", { summary: Constants.per.authOnly })
async authenticatorQrcode() {
const userId = this.getUserId();
const qrcode = await this.twoFactorService.getAuthenticatorQrCode(userId);
return this.ok(qrcode);
const {qrcode,link,secret} = await this.twoFactorService.getAuthenticatorQrCode(userId);
return this.ok({qrcode,link,secret});
}
@Post("/authenticator/save", { summary: Constants.per.authOnly })