generate random optIn Code the same way

This commit is contained in:
Ulf Gebhardt 2021-11-24 03:02:17 +01:00
parent e0ac39ab87
commit d0ba662bab
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -393,7 +393,7 @@ export class UserResolver {
emailAlreadySend = true
} else {
optInCode = new LoginEmailOptIn()
optInCode.verificationCode = randomBytes(16).readBigInt64LE()
optInCode.verificationCode = random(64)
optInCode.userId = loginUser.id
optInCode.emailOptInTypeId = EMAIL_OPT_IN_RESET_PASSWORD
await optInCode.save()