@fonderie/auth 7.0.0 → 7.1.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/brain/outcomes.md +1 -0
- package/brain/signatures.md +1 -0
- package/dist/index.cjs +53 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +56 -28
- package/dist/index.js.map +1 -1
- package/dist/middlewares/index.d.cts +1 -1
- package/dist/middlewares/index.d.ts +1 -1
- package/dist/migrations/sql/015_password_reset_token.sql +11 -0
- package/dist/{session-Db6KZca3.d.cts → session-6B77MAFn.d.cts} +1 -0
- package/dist/{session-Db6KZca3.d.ts → session-6B77MAFn.d.ts} +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Re-introduce a high-entropy reset token ALONGSIDE the 6-digit pin (008 had
|
|
2
|
+
-- renamed the original token column into pin). The pin stays for the
|
|
3
|
+
-- code-entry UX (rate-limited at the route); the token backs a reset LINK
|
|
4
|
+
-- that needs no rate limit because it isn't brute-forceable. Nullable so
|
|
5
|
+
-- existing rows are valid; a partial unique index enforces uniqueness only
|
|
6
|
+
-- for the non-null tokens.
|
|
7
|
+
ALTER TABLE fonderie_password_resets ADD COLUMN IF NOT EXISTS token TEXT;
|
|
8
|
+
|
|
9
|
+
CREATE UNIQUE INDEX IF NOT EXISTS uq_fonderie_password_resets_token
|
|
10
|
+
ON fonderie_password_resets (token)
|
|
11
|
+
WHERE token IS NOT NULL;
|
|
@@ -44,6 +44,7 @@ interface IAuthConfig extends IAuthSecrets, IAuthRuntimeConfig {
|
|
|
44
44
|
accessTokenDuration?: string;
|
|
45
45
|
providers: ('email' | 'phone' | 'google' | 'github')[];
|
|
46
46
|
appName?: string;
|
|
47
|
+
passwordResetUrl?: string;
|
|
47
48
|
resolve?: (ctx: {
|
|
48
49
|
meta: Record<string, unknown>;
|
|
49
50
|
}) => Partial<IAuthRuntimeConfig>;
|
|
@@ -44,6 +44,7 @@ interface IAuthConfig extends IAuthSecrets, IAuthRuntimeConfig {
|
|
|
44
44
|
accessTokenDuration?: string;
|
|
45
45
|
providers: ('email' | 'phone' | 'google' | 'github')[];
|
|
46
46
|
appName?: string;
|
|
47
|
+
passwordResetUrl?: string;
|
|
47
48
|
resolve?: (ctx: {
|
|
48
49
|
meta: Record<string, unknown>;
|
|
49
50
|
}) => Partial<IAuthRuntimeConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonderie/auth",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Drop-in auth for SaaS — email/password, phone OTP, Google OAuth, stateless JWT sessions, TOTP-based MFA with backup codes, and self-service password recovery.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fonderiejs",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"jsonwebtoken": "^9.0.3",
|
|
59
59
|
"qrcode": "^1.5.4",
|
|
60
60
|
"zod": "^4.5.4",
|
|
61
|
-
"@fonderie/rate-limit": "^4.0.
|
|
61
|
+
"@fonderie/rate-limit": "^4.0.7"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@fonderie/core": "^0.
|
|
64
|
+
"@fonderie/core": "^0.10.0",
|
|
65
65
|
"@fonderie/events": "^5.0.0",
|
|
66
66
|
"@fonderie/store": "^0.3.0"
|
|
67
67
|
},
|