@absolutejs/auth 0.49.3 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/migrate.js +8 -2
- package/dist/cli/migrate.js.map +4 -4
- package/dist/index.js +27 -3
- package/dist/index.js.map +7 -7
- package/dist/mfa/challenge.d.ts +1 -1
- package/dist/mfa/config.d.ts +2 -0
- package/dist/mfa/postgresMfaStore.d.ts +15 -0
- package/dist/mfa/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/cli/migrate.js
CHANGED
|
@@ -2474,6 +2474,7 @@ var mfaEnrollmentsTable = pgTable8("auth_mfa_enrollments", {
|
|
|
2474
2474
|
sms_pending_code_hash: text4("sms_pending_code_hash"),
|
|
2475
2475
|
sms_phone: varchar8("sms_phone", { length: PHONE_LENGTH }),
|
|
2476
2476
|
sms_verified: boolean3("sms_verified").notNull().default(false),
|
|
2477
|
+
totp_failed_attempts: smallint("totp_failed_attempts").notNull().default(0),
|
|
2477
2478
|
totp_secret_ciphertext: text4("totp_secret_ciphertext"),
|
|
2478
2479
|
totp_verified: boolean3("totp_verified").notNull().default(false),
|
|
2479
2480
|
updated_at_ms: bigint6("updated_at_ms", { mode: "number" }).notNull(),
|
|
@@ -2989,6 +2990,10 @@ var mfaSmsColumnsMigration = {
|
|
|
2989
2990
|
].join(`
|
|
2990
2991
|
`)
|
|
2991
2992
|
};
|
|
2993
|
+
var mfaTotpLockoutMigration = {
|
|
2994
|
+
id: "0003_totp_lockout",
|
|
2995
|
+
sql: 'ALTER TABLE "auth_mfa_enrollments" ADD COLUMN IF NOT EXISTS "totp_failed_attempts" smallint NOT NULL DEFAULT 0;'
|
|
2996
|
+
};
|
|
2992
2997
|
var blockMigrations = {
|
|
2993
2998
|
adaptive: initMigration("adaptive", [knownDevicesTable, loginHistoryTable]),
|
|
2994
2999
|
apikeys: initMigration("apikeys", [
|
|
@@ -3012,7 +3017,8 @@ var blockMigrations = {
|
|
|
3012
3017
|
block: "mfa",
|
|
3013
3018
|
migrations: [
|
|
3014
3019
|
...initMigration("mfa", [mfaEnrollmentsTable]).migrations,
|
|
3015
|
-
mfaSmsColumnsMigration
|
|
3020
|
+
mfaSmsColumnsMigration,
|
|
3021
|
+
mfaTotpLockoutMigration
|
|
3016
3022
|
]
|
|
3017
3023
|
},
|
|
3018
3024
|
oidc: initMigration("oidc", [
|
|
@@ -3218,5 +3224,5 @@ var main = async () => {
|
|
|
3218
3224
|
};
|
|
3219
3225
|
await main();
|
|
3220
3226
|
|
|
3221
|
-
//# debugId=
|
|
3227
|
+
//# debugId=A0E2D0A519547C3E64756E2164756E21
|
|
3222
3228
|
//# sourceMappingURL=migrate.js.map
|