@absolutejs/auth 0.49.3 → 0.51.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 +40 -2
- package/dist/cli/migrate.js.map +6 -6
- package/dist/htmx/index.js +38 -5
- package/dist/htmx/index.js.map +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +144 -19
- package/dist/index.js.map +15 -15
- 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/dist/providers/clients.d.ts +1740 -6
- package/dist/providers/index.js +38 -5
- package/dist/providers/index.js.map +3 -3
- package/dist/routes/authorize.d.ts +2 -2
- package/dist/typebox.d.ts +1 -3
- package/dist/types.d.ts +29 -4
- package/dist/utils.d.ts +5 -4
- package/package.json +2 -2
package/dist/cli/migrate.js
CHANGED
|
@@ -1597,6 +1597,37 @@ var providers = defineProviders({
|
|
|
1597
1597
|
url: (config) => `https://${config.domain}/oauth2/default/v1/token`
|
|
1598
1598
|
}
|
|
1599
1599
|
},
|
|
1600
|
+
onspark: {
|
|
1601
|
+
authorizationUrl: "https://app.onspark.com/oauth2/authorize",
|
|
1602
|
+
email: ["email"],
|
|
1603
|
+
familyName: ["family_name"],
|
|
1604
|
+
fullName: ["name"],
|
|
1605
|
+
givenName: ["given_name"],
|
|
1606
|
+
isOIDC: true,
|
|
1607
|
+
isRefreshable: true,
|
|
1608
|
+
picture: ["picture"],
|
|
1609
|
+
PKCEMethod: "S256",
|
|
1610
|
+
profileRequest: {
|
|
1611
|
+
authIn: "header",
|
|
1612
|
+
encoding: "application/json",
|
|
1613
|
+
method: "GET",
|
|
1614
|
+
url: "https://app.onspark.com/oauth2/userinfo"
|
|
1615
|
+
},
|
|
1616
|
+
revocationRequest: {
|
|
1617
|
+
authIn: "body",
|
|
1618
|
+
encoding: "application/x-www-form-urlencoded",
|
|
1619
|
+
tokenParamName: "token",
|
|
1620
|
+
url: "https://app.onspark.com/oauth2/revoke"
|
|
1621
|
+
},
|
|
1622
|
+
scopeRequired: true,
|
|
1623
|
+
subject: ["sub"],
|
|
1624
|
+
subjectType: "string",
|
|
1625
|
+
tokenRequest: {
|
|
1626
|
+
authIn: "body",
|
|
1627
|
+
encoding: "application/x-www-form-urlencoded",
|
|
1628
|
+
url: "https://app.onspark.com/oauth2/token"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1600
1631
|
osu: {
|
|
1601
1632
|
authorizationUrl: "https://osu.ppy.sh/oauth/authorize",
|
|
1602
1633
|
isOIDC: false,
|
|
@@ -2148,6 +2179,7 @@ var providers = defineProviders({
|
|
|
2148
2179
|
method: "POST",
|
|
2149
2180
|
url: "https://wbsapi.withings.net/v2/oauth2"
|
|
2150
2181
|
},
|
|
2182
|
+
scopeDelimiter: ",",
|
|
2151
2183
|
scopeRequired: true,
|
|
2152
2184
|
subject: ["userid"],
|
|
2153
2185
|
subjectType: "string",
|
|
@@ -2474,6 +2506,7 @@ var mfaEnrollmentsTable = pgTable8("auth_mfa_enrollments", {
|
|
|
2474
2506
|
sms_pending_code_hash: text4("sms_pending_code_hash"),
|
|
2475
2507
|
sms_phone: varchar8("sms_phone", { length: PHONE_LENGTH }),
|
|
2476
2508
|
sms_verified: boolean3("sms_verified").notNull().default(false),
|
|
2509
|
+
totp_failed_attempts: smallint("totp_failed_attempts").notNull().default(0),
|
|
2477
2510
|
totp_secret_ciphertext: text4("totp_secret_ciphertext"),
|
|
2478
2511
|
totp_verified: boolean3("totp_verified").notNull().default(false),
|
|
2479
2512
|
updated_at_ms: bigint6("updated_at_ms", { mode: "number" }).notNull(),
|
|
@@ -2989,6 +3022,10 @@ var mfaSmsColumnsMigration = {
|
|
|
2989
3022
|
].join(`
|
|
2990
3023
|
`)
|
|
2991
3024
|
};
|
|
3025
|
+
var mfaTotpLockoutMigration = {
|
|
3026
|
+
id: "0003_totp_lockout",
|
|
3027
|
+
sql: 'ALTER TABLE "auth_mfa_enrollments" ADD COLUMN IF NOT EXISTS "totp_failed_attempts" smallint NOT NULL DEFAULT 0;'
|
|
3028
|
+
};
|
|
2992
3029
|
var blockMigrations = {
|
|
2993
3030
|
adaptive: initMigration("adaptive", [knownDevicesTable, loginHistoryTable]),
|
|
2994
3031
|
apikeys: initMigration("apikeys", [
|
|
@@ -3012,7 +3049,8 @@ var blockMigrations = {
|
|
|
3012
3049
|
block: "mfa",
|
|
3013
3050
|
migrations: [
|
|
3014
3051
|
...initMigration("mfa", [mfaEnrollmentsTable]).migrations,
|
|
3015
|
-
mfaSmsColumnsMigration
|
|
3052
|
+
mfaSmsColumnsMigration,
|
|
3053
|
+
mfaTotpLockoutMigration
|
|
3016
3054
|
]
|
|
3017
3055
|
},
|
|
3018
3056
|
oidc: initMigration("oidc", [
|
|
@@ -3218,5 +3256,5 @@ var main = async () => {
|
|
|
3218
3256
|
};
|
|
3219
3257
|
await main();
|
|
3220
3258
|
|
|
3221
|
-
//# debugId=
|
|
3259
|
+
//# debugId=E4B9B0BD4BF7B45364756E2164756E21
|
|
3222
3260
|
//# sourceMappingURL=migrate.js.map
|