fix: twofactor id constriant fail

This commit is contained in:
Bereket Engida
2024-10-16 12:53:30 +03:00
parent 86ea2def73
commit feb28df949

View File

@@ -76,9 +76,10 @@ export const twoFactor = (options?: TwoFactorOptions) => {
twoFactorEnabled: true,
});
const res = await ctx.context.adapter.create({
await ctx.context.adapter.create({
model: opts.twoFactorTable,
data: {
id: ctx.context.uuid(),
secret: encryptedSecret,
backupCodes: backupCodes.encryptedBackupCodes,
userId: user.id,