We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcbe763 commit 2c823f0Copy full SHA for 2c823f0
src/services/otp.ts
@@ -1,4 +1,5 @@
1
export const otp = (): string =>
2
+ process.env.CODE ??
3
Math.floor(Math.random() * 999999)
4
.toString()
5
.padStart(6, "0");
src/targets/adminCreateUser.ts
@@ -120,7 +120,7 @@ export const AdminCreateUser =
120
const now = clock.get();
121
122
const temporaryPassword =
123
- req.TemporaryPassword ?? generator.new().slice(0, 6);
+ req.TemporaryPassword ?? process.env.CODE ?? generator.new().slice(0, 6);
124
125
const isEmailUsername =
126
config.UserPoolDefaults.UsernameAttributes?.includes("email");
0 commit comments