@payez/next-mvp 4.5.6 → 4.7.9
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/api-handlers/auth/credential-login-email-code.d.ts +24 -0
- package/dist/api-handlers/auth/credential-login-email-code.js +83 -0
- package/dist/api-handlers/auth/credential-login.d.ts +41 -0
- package/dist/api-handlers/auth/credential-login.js +858 -0
- package/dist/api-handlers/oauth/resume.d.ts +16 -0
- package/dist/api-handlers/oauth/resume.js +207 -0
- package/dist/auth/better-auth.d.ts +14 -2
- package/dist/auth/better-auth.js +59 -34
- package/dist/auth/idp-oauth.d.ts +106 -0
- package/dist/auth/idp-oauth.js +280 -0
- package/dist/auth/safe-callback.js +15 -2
- package/dist/auth/session-cookie-clear.d.ts +7 -0
- package/dist/auth/session-cookie-clear.js +24 -0
- package/dist/auth/session-reset-link.d.ts +43 -0
- package/dist/auth/session-reset-link.js +144 -0
- package/dist/components/auth/CredentialSignInForm.d.ts +33 -0
- package/dist/components/auth/CredentialSignInForm.js +134 -0
- package/dist/lib/authorize-resume.d.ts +87 -0
- package/dist/lib/authorize-resume.js +190 -0
- package/dist/lib/bearer-fetch.d.ts +17 -0
- package/dist/lib/bearer-fetch.js +32 -0
- package/dist/lib/code-step-copy.d.ts +53 -0
- package/dist/lib/code-step-copy.js +73 -0
- package/dist/lib/credential-sign-in-client.d.ts +59 -0
- package/dist/lib/credential-sign-in-client.js +89 -0
- package/dist/lib/device-id.d.ts +37 -0
- package/dist/lib/device-id.js +70 -0
- package/dist/lib/lock-window.d.ts +29 -0
- package/dist/lib/lock-window.js +53 -0
- package/dist/lib/login-error-message.d.ts +18 -0
- package/dist/lib/login-error-message.js +47 -0
- package/dist/lib/twofa-rejection.d.ts +20 -0
- package/dist/lib/twofa-rejection.js +73 -0
- package/dist/middleware/create-middleware.d.ts +25 -1
- package/dist/middleware/create-middleware.js +75 -27
- package/dist/pages/login/page.js +11 -37
- package/dist/routes/auth/credential-login-email-code.d.ts +6 -0
- package/dist/routes/auth/credential-login-email-code.js +10 -0
- package/dist/routes/auth/credential-login.d.ts +6 -0
- package/dist/routes/auth/credential-login.js +10 -0
- package/dist/routes/auth/session-reset.d.ts +21 -0
- package/dist/routes/auth/session-reset.js +40 -0
- package/dist/routes/oauth/resume.d.ts +11 -0
- package/dist/routes/oauth/resume.js +16 -0
- package/package.json +1102 -1042
- package/src/api-handlers/auth/credential-login-email-code.ts +92 -0
- package/src/api-handlers/auth/credential-login.ts +948 -0
- package/src/api-handlers/oauth/resume.ts +182 -0
- package/src/auth/better-auth.ts +81 -5
- package/src/auth/idp-oauth.ts +310 -0
- package/src/auth/safe-callback.ts +16 -2
- package/src/auth/session-cookie-clear.ts +30 -0
- package/src/auth/session-reset-link.ts +159 -0
- package/src/components/auth/CredentialSignInForm.tsx +240 -0
- package/src/lib/authorize-resume.ts +187 -0
- package/src/lib/bearer-fetch.ts +31 -0
- package/src/lib/code-step-copy.ts +83 -0
- package/src/lib/credential-sign-in-client.ts +101 -0
- package/src/lib/device-id.ts +67 -0
- package/src/lib/lock-window.ts +49 -0
- package/src/lib/login-error-message.ts +41 -0
- package/src/lib/twofa-rejection.ts +91 -0
- package/src/middleware/create-middleware.ts +124 -30
- package/src/pages/login/page.tsx +20 -34
- package/src/routes/auth/credential-login-email-code.ts +6 -0
- package/src/routes/auth/credential-login.ts +6 -0
- package/src/routes/auth/session-reset.ts +37 -0
- package/src/routes/oauth/resume.ts +11 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLOCK_TOLERANCE_SECONDS = void 0;
|
|
4
|
+
exports.resolveIdpRedirectUri = resolveIdpRedirectUri;
|
|
5
|
+
exports.amrIncludesMfa = amrIncludesMfa;
|
|
6
|
+
exports.isAddressShaped = isAddressShaped;
|
|
7
|
+
exports.resolveEmail = resolveEmail;
|
|
8
|
+
exports.createIdpOAuthHooks = createIdpOAuthHooks;
|
|
9
|
+
/**
|
|
10
|
+
* PAY-2305 (next-mvp 4.7.4): the two hooks that let better-auth's genericOAuth talk to THIS IdP.
|
|
11
|
+
*
|
|
12
|
+
* WHY THEY EXIST (source read, PayEz-Core master d53f192af, BAPert 74014):
|
|
13
|
+
* - POST /api/oauth/token takes a JSON body (snake_case), not better-auth's default form body, and answers with the
|
|
14
|
+
* Core response envelope { success, data: { access_token, refresh_token, token_type, expires_in, user } }.
|
|
15
|
+
* better-auth's default exchange reads top-level fields and would find nothing.
|
|
16
|
+
* - There is NO id_token and NO userinfo endpoint (deliberate, PAY-1585). The only proof of who signed in is the
|
|
17
|
+
* access token itself: an RS-family bearer JWT (RS512 on dev-93's JWKS, measured) signed by the IdP bearer key (jwks_uri in discovery) with sub, email,
|
|
18
|
+
* roles, amr, token_type.
|
|
19
|
+
*
|
|
20
|
+
* TRUST RULE: a claim is read ONLY from a token whose signature, issuer, expiry and token_type were verified here.
|
|
21
|
+
* Never base64-decode and believe. Only RSA signatures are accepted (the RS and PS families; the JWKS key's own declared alg is binding), so a token
|
|
22
|
+
* re-signed with HS256 using the public key as the secret, or alg none, is refused. The `aud` of an IdP bearer is the IdP's public constant, not this client, so it is not a
|
|
23
|
+
* binding; the binding to THIS client is the authorization code + PKCE verifier + exact redirect_uri that Core checks.
|
|
24
|
+
*
|
|
25
|
+
* The redirect_uri sent here MUST be byte-identical at the authorize step and the token step (Core compares it
|
|
26
|
+
* Ordinal at the token step) and equal to the registered {site_url}/api/auth/callback (Core compares it exactly,
|
|
27
|
+
* case-insensitively, at the authorize step). Both come from ONE value: the `redirectURI` of the provider config.
|
|
28
|
+
*/
|
|
29
|
+
const jose_1 = require("jose");
|
|
30
|
+
const DISCOVERY_TTL_MS = 10 * 60 * 1000;
|
|
31
|
+
const HTTP_TIMEOUT_MS = 10_000;
|
|
32
|
+
/** The URI sent at authorize AND token time. Explicit env wins; else the registered {app}/api/auth/callback form. */
|
|
33
|
+
function resolveIdpRedirectUri(appBaseUrl, env = process.env) {
|
|
34
|
+
const explicit = env.IDP_OAUTH_REDIRECT_URI?.trim();
|
|
35
|
+
if (explicit)
|
|
36
|
+
return explicit;
|
|
37
|
+
return appBaseUrl.replace(/\/+$/, '') + '/api/auth/callback';
|
|
38
|
+
}
|
|
39
|
+
/** amr arrives as an array, a JSON-array string, or a delimited string (Core's own reader accepts all three). */
|
|
40
|
+
function amrIncludesMfa(amr) {
|
|
41
|
+
let values = [];
|
|
42
|
+
if (Array.isArray(amr))
|
|
43
|
+
values = amr;
|
|
44
|
+
else if (typeof amr === 'string') {
|
|
45
|
+
const t = amr.trim();
|
|
46
|
+
if (t.startsWith('[')) {
|
|
47
|
+
try {
|
|
48
|
+
const parsed = JSON.parse(t);
|
|
49
|
+
if (Array.isArray(parsed))
|
|
50
|
+
values = parsed;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
values = [];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
values = t.split(/[\s,]+/);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return values.some((v) => typeof v === 'string' && v.trim().toLowerCase() === 'mfa');
|
|
61
|
+
}
|
|
62
|
+
/** Max skew accepted on nbf/exp/iat when verifying the IdP access token. */
|
|
63
|
+
exports.CLOCK_TOLERANCE_SECONDS = 30;
|
|
64
|
+
/**
|
|
65
|
+
* Address shape, a POSITIVE character rule (PAY-2337, Scout 74285): the local part may contain only [A-Za-z0-9] and . _ % + - ' ; the domain only
|
|
66
|
+
* [A-Za-z0-9-] labels joined by dots; one @, <= 254 total, local <= 64, no leading/trailing/double dot in the local part, a dotted domain.
|
|
67
|
+
* Everything else is NOT an address, and in particular a MASK: Core masks data.user.email on purpose (MaskedEmailJsonConverter), today with '*',
|
|
68
|
+
* tomorrow maybe a bullet, an ellipsis or an 'x' run; a blacklist of one glyph would pass the next mask. Not a deliverability check.
|
|
69
|
+
*/
|
|
70
|
+
function isAddressShaped(v) {
|
|
71
|
+
if (typeof v !== 'string' || v.length === 0 || v.length > 254)
|
|
72
|
+
return false;
|
|
73
|
+
if (!/^[A-Za-z0-9._%+'-]+@[A-Za-z0-9.-]+$/.test(v))
|
|
74
|
+
return false;
|
|
75
|
+
const [local, domain] = v.split('@');
|
|
76
|
+
if (local.length > 64 || local.startsWith('.') || local.endsWith('.') || local.includes('..'))
|
|
77
|
+
return false;
|
|
78
|
+
return /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)+$/.test(domain) && !domain.startsWith('-') && !domain.endsWith('-');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The account address (BAPert 74193 / 74196, 4.7.8). Core's code-flow access token has NO email claim; its sub and ws-identity name claim are
|
|
82
|
+
* both user.UserName, which is a LOGIN, not the mailbox: it may be address-shaped and still differ from the account's Email (4.7.7 vetoed on that
|
|
83
|
+
* and refused every such sign-in, NightHawk 74189). Sources: the token RESPONSE's data.user.email (token endpoint, TLS) and/or the signed token's
|
|
84
|
+
* own email claim; if both are present they must be equal. sub / the name claim are NEITHER a source NOR a veto. Not trimmed. Returns '' on any doubt.
|
|
85
|
+
*/
|
|
86
|
+
function resolveEmail(payload, responseEmail) {
|
|
87
|
+
// NOT trimmed: padding or a trailing newline is a malformed address (refused by the shape check), never silently repaired.
|
|
88
|
+
const raw = (v) => (typeof v === 'string' ? v : '');
|
|
89
|
+
const sources = [raw(payload.email), raw(responseEmail)].filter((v) => v.trim() !== '');
|
|
90
|
+
if (sources.length === 0 || !sources.every(isAddressShaped))
|
|
91
|
+
return '';
|
|
92
|
+
const chosen = sources[0];
|
|
93
|
+
const same = (a) => a.toLowerCase() === chosen.toLowerCase();
|
|
94
|
+
if (!sources.every(same))
|
|
95
|
+
return '';
|
|
96
|
+
return chosen;
|
|
97
|
+
}
|
|
98
|
+
function rolesOf(claim) {
|
|
99
|
+
if (Array.isArray(claim))
|
|
100
|
+
return claim.filter((r) => typeof r === 'string' && r.length > 0);
|
|
101
|
+
if (typeof claim === 'string' && claim.trim()) {
|
|
102
|
+
const t = claim.trim();
|
|
103
|
+
if (t.startsWith('[')) {
|
|
104
|
+
try {
|
|
105
|
+
const parsed = JSON.parse(t);
|
|
106
|
+
if (Array.isArray(parsed))
|
|
107
|
+
return parsed.filter((r) => typeof r === 'string' && r.length > 0);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return [];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return t.split(/[\s,]+/).filter(Boolean);
|
|
114
|
+
}
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
function createIdpOAuthHooks(opts) {
|
|
118
|
+
const fetchFn = opts.deps?.fetch ?? fetch;
|
|
119
|
+
const now = opts.deps?.now ?? (() => Date.now());
|
|
120
|
+
const getKeySet = opts.deps?.getKeySet ?? ((uri) => (0, jose_1.createRemoteJWKSet)(new URL(uri)));
|
|
121
|
+
let discovery = null;
|
|
122
|
+
const keySets = new Map();
|
|
123
|
+
/** access token -> data.user.email / user_name from the token response, consumed by getUserInfo for THAT token (bounded; never keyed by anything shared). */
|
|
124
|
+
const responseUsers = new Map();
|
|
125
|
+
async function loadDiscovery() {
|
|
126
|
+
if (discovery && now() - discovery.at < DISCOVERY_TTL_MS)
|
|
127
|
+
return discovery.doc;
|
|
128
|
+
const res = await fetchFn(opts.discoveryUrl, {
|
|
129
|
+
headers: { Accept: 'application/json' },
|
|
130
|
+
redirect: 'error',
|
|
131
|
+
signal: AbortSignal.timeout(HTTP_TIMEOUT_MS),
|
|
132
|
+
});
|
|
133
|
+
if (!res.ok)
|
|
134
|
+
throw new Error(`IdP discovery returned ${res.status}`);
|
|
135
|
+
const doc = (await res.json());
|
|
136
|
+
if (typeof doc?.token_endpoint !== 'string' || typeof doc?.jwks_uri !== 'string' || typeof doc?.issuer !== 'string') {
|
|
137
|
+
throw new Error('IdP discovery document is missing token_endpoint, jwks_uri or issuer');
|
|
138
|
+
}
|
|
139
|
+
const allowed = new Set([new URL(opts.discoveryUrl).origin, ...(opts.trustedOrigins ?? []).map((o) => o.replace(/\/+$/, ''))]);
|
|
140
|
+
for (const field of ['token_endpoint', 'jwks_uri']) {
|
|
141
|
+
const origin = new URL(doc[field]).origin;
|
|
142
|
+
if (!allowed.has(origin))
|
|
143
|
+
throw new Error(`IdP discovery ${field} points at an untrusted origin (${origin})`);
|
|
144
|
+
}
|
|
145
|
+
discovery = { doc, at: now() }; // only a good document is cached
|
|
146
|
+
return doc;
|
|
147
|
+
}
|
|
148
|
+
/** better-auth `getToken`: JSON body, envelope unwrapped, no data.access_token => refused. */
|
|
149
|
+
async function getToken(data) {
|
|
150
|
+
const doc = await loadDiscovery();
|
|
151
|
+
if (!data.codeVerifier)
|
|
152
|
+
throw new Error('IdP token exchange refused: no PKCE code_verifier');
|
|
153
|
+
const res = await fetchFn(doc.token_endpoint, {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
156
|
+
redirect: 'error',
|
|
157
|
+
signal: AbortSignal.timeout(HTTP_TIMEOUT_MS),
|
|
158
|
+
body: JSON.stringify({
|
|
159
|
+
grant_type: 'authorization_code',
|
|
160
|
+
code: data.code,
|
|
161
|
+
code_verifier: data.codeVerifier,
|
|
162
|
+
// Deliberately NOT data.redirectURI: that is better-auth's own computed callback, not the registered URI.
|
|
163
|
+
redirect_uri: opts.redirectURI,
|
|
164
|
+
client_id: opts.clientId,
|
|
165
|
+
}),
|
|
166
|
+
});
|
|
167
|
+
let body;
|
|
168
|
+
try {
|
|
169
|
+
body = await res.json();
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
throw new Error(`IdP token response (${res.status}) was not JSON`);
|
|
173
|
+
}
|
|
174
|
+
if (!res.ok) {
|
|
175
|
+
const code = body?.error?.code ?? body?.error ?? body?.code ?? 'unknown';
|
|
176
|
+
throw new Error(`IdP token exchange refused (${res.status}, ${typeof code === 'string' ? code : 'unknown'})`);
|
|
177
|
+
}
|
|
178
|
+
const d = body?.data;
|
|
179
|
+
if (!d || typeof d.access_token !== 'string' || !d.access_token) {
|
|
180
|
+
throw new Error('IdP token response has no data.access_token (envelope not as expected)');
|
|
181
|
+
}
|
|
182
|
+
const expiresIn = typeof d.expires_in === 'number' && d.expires_in > 0 ? d.expires_in : undefined;
|
|
183
|
+
const expires = expiresIn ? now() + expiresIn * 1000 : undefined;
|
|
184
|
+
if (d.user && typeof d.user === 'object' && typeof d.user.email === 'string') {
|
|
185
|
+
if (responseUsers.size >= 64)
|
|
186
|
+
responseUsers.delete(responseUsers.keys().next().value);
|
|
187
|
+
responseUsers.set(d.access_token, { email: d.user.email, userName: typeof d.user.user_name === 'string' ? d.user.user_name : '' });
|
|
188
|
+
}
|
|
189
|
+
opts.onTokens?.({
|
|
190
|
+
accessToken: d.access_token,
|
|
191
|
+
refreshToken: typeof d.refresh_token === 'string' ? d.refresh_token : undefined,
|
|
192
|
+
accessTokenExpires: expires,
|
|
193
|
+
tokenType: typeof d.token_type === 'string' ? d.token_type : undefined,
|
|
194
|
+
user: d.user && typeof d.user === 'object' ? d.user : undefined,
|
|
195
|
+
});
|
|
196
|
+
return {
|
|
197
|
+
tokenType: typeof d.token_type === 'string' ? d.token_type : 'Bearer',
|
|
198
|
+
accessToken: d.access_token,
|
|
199
|
+
refreshToken: typeof d.refresh_token === 'string' ? d.refresh_token : undefined,
|
|
200
|
+
accessTokenExpiresAt: expires ? new Date(expires) : undefined,
|
|
201
|
+
scopes: [],
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
/** better-auth `getUserInfo`: the user comes from the VERIFIED access token. Returns null (never a guess) on any doubt. */
|
|
205
|
+
async function getUserInfo(tokens) {
|
|
206
|
+
try {
|
|
207
|
+
if (!tokens?.accessToken)
|
|
208
|
+
return null;
|
|
209
|
+
const doc = await loadDiscovery();
|
|
210
|
+
// A token without a kid is refused: no "first key" fallback. (A kid that is not in the key set is refused by jose.)
|
|
211
|
+
const kid = (0, jose_1.decodeProtectedHeader)(tokens.accessToken).kid;
|
|
212
|
+
if (typeof kid !== 'string' || !kid)
|
|
213
|
+
throw new Error('token header has no kid');
|
|
214
|
+
const jwksUri = doc.jwks_uri;
|
|
215
|
+
let keys = keySets.get(jwksUri);
|
|
216
|
+
if (!keys) {
|
|
217
|
+
keys = getKeySet(jwksUri);
|
|
218
|
+
keySets.set(jwksUri, keys);
|
|
219
|
+
}
|
|
220
|
+
const { payload } = await (0, jose_1.jwtVerify)(tokens.accessToken, keys, {
|
|
221
|
+
// RSA signatures ONLY (RS256/384/512, PS256/384/512; BAPert 74117): never HS* (a token "signed" with the public key as an HMAC
|
|
222
|
+
// secret), never none, never ES. 4.7.4/4.7.5 pinned RS256 from a source read; the live IdP's JWKS (dev-93, kid 46) declares alg RS512
|
|
223
|
+
// and every real access token was refused (NightHawk 74114). Which RS alg is binding is the JWKS KEY's own declared
|
|
224
|
+
// `alg`: jose only offers a JWK to a token whose header alg equals that JWK's `alg`, so a token cannot choose a
|
|
225
|
+
// weaker/other algorithm than the published key says. A JWK with no `alg` accepts any listed RSA alg; a symmetric (oct) key is never usable for these algorithms.
|
|
226
|
+
algorithms: ['RS256', 'RS384', 'RS512', 'PS256', 'PS384', 'PS512'],
|
|
227
|
+
issuer: opts.issuer ?? doc.issuer,
|
|
228
|
+
currentDate: new Date(now()),
|
|
229
|
+
// The IdP stamps nbf = issue time with no skew and the token is verified in the same second it is minted (NightHawk 74151:
|
|
230
|
+
// "nbf claim timestamp check failed"). 30 s, bounded. jose applies it to exp too: a token is accepted up to 30 s after exp.
|
|
231
|
+
clockTolerance: exports.CLOCK_TOLERANCE_SECONDS,
|
|
232
|
+
});
|
|
233
|
+
if (payload.token_type !== 'bearer_token')
|
|
234
|
+
throw new Error('token_type is not bearer_token');
|
|
235
|
+
if (typeof payload.sub !== 'string' || !payload.sub)
|
|
236
|
+
throw new Error('no sub');
|
|
237
|
+
const hasEmailClaim = typeof payload.email === 'string' && payload.email.trim() !== '';
|
|
238
|
+
const responseUser = responseUsers.get(tokens.accessToken);
|
|
239
|
+
responseUsers.delete(tokens.accessToken);
|
|
240
|
+
// The response user object (UNSIGNED body) must be the TOKEN's user (Scout 74198, DotNetPert-Scout 74202): Core fills data.user.user_name and the
|
|
241
|
+
// signed sub from the same loaded user in one mint, so WHENEVER a response user exists (even if a signed email claim is also present), user_name MUST be present
|
|
242
|
+
// and equal sub (case-insensitive). A different or missing user_name means the address may belong to someone else -> refuse. Does not constrain email == sub.
|
|
243
|
+
if (responseUser && responseUser.userName.trim().toLowerCase() !== payload.sub.trim().toLowerCase()) {
|
|
244
|
+
throw new Error('token response user is missing or does not match the token subject');
|
|
245
|
+
}
|
|
246
|
+
// A MASKED / unusable response address is ABSENT (PAY-2337), not "a different address": a valid signed claim still signs in, and with no claim
|
|
247
|
+
// there is no source. NEVER repaired or unmasked (no prefix match against sub or the claim). Log names only the fact, no value, no length.
|
|
248
|
+
const responseEmailRaw = responseUser?.email ?? '';
|
|
249
|
+
const responseEmailUsable = isAddressShaped(responseEmailRaw);
|
|
250
|
+
const responseMasked = responseEmailRaw.trim() !== '' && !responseEmailUsable;
|
|
251
|
+
if (responseMasked)
|
|
252
|
+
console.warn('[BETTER_AUTH] payez-idp token response address is masked or unusable; ignored');
|
|
253
|
+
const email = resolveEmail(payload, responseEmailUsable ? responseEmailRaw : undefined);
|
|
254
|
+
if (!email) {
|
|
255
|
+
throw new Error(responseMasked ? 'response address is masked' : 'no usable email (needs data.user.email or an email claim, address-shaped, equal when both are present)');
|
|
256
|
+
}
|
|
257
|
+
const name = (typeof payload.name === 'string' && payload.name.trim()) ||
|
|
258
|
+
(typeof payload.full_name === 'string' && payload.full_name.trim()) ||
|
|
259
|
+
email.split('@')[0];
|
|
260
|
+
const claims = {
|
|
261
|
+
sub: payload.sub,
|
|
262
|
+
email,
|
|
263
|
+
name,
|
|
264
|
+
userId: typeof payload.user_id === 'string' || typeof payload.user_id === 'number' ? String(payload.user_id) : undefined,
|
|
265
|
+
roles: rolesOf(payload.roles),
|
|
266
|
+
mfaVerified: amrIncludesMfa(payload.amr),
|
|
267
|
+
// Only the signed token's own email CLAIM can be verified; an address that came from the token response (data.user.email) never asserts it.
|
|
268
|
+
emailVerified: hasEmailClaim && (payload.email_verified === true || payload.email_verified === 'true'),
|
|
269
|
+
};
|
|
270
|
+
opts.onClaims?.(claims);
|
|
271
|
+
return { id: claims.sub, email: claims.email, name: claims.name, emailVerified: claims.emailVerified };
|
|
272
|
+
}
|
|
273
|
+
catch (err) {
|
|
274
|
+
// Reason only, never the token.
|
|
275
|
+
console.warn('[BETTER_AUTH] payez-idp access token refused:', err instanceof Error ? err.message : String(err));
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return { getToken, getUserInfo };
|
|
280
|
+
}
|
|
@@ -68,6 +68,14 @@ exports.resolveCallbackDestination = resolveCallbackDestination;
|
|
|
68
68
|
exports.DEFAULT_CALLBACK = '/';
|
|
69
69
|
/** The auth surface. A callback pointing back into it causes a redirect cycle. */
|
|
70
70
|
const AUTH_PREFIX = '/account-auth/';
|
|
71
|
+
/**
|
|
72
|
+
* PAY-2315 (4.7.1): the middleware now treats the public /login page like /account-auth/login (a signed-in user is sent
|
|
73
|
+
* on), so a callback or a resolved path that is /login itself must be refused here too - otherwise /login with no
|
|
74
|
+
* callbackUrl would resolve its own pathname as the destination and redirect to itself forever.
|
|
75
|
+
*/
|
|
76
|
+
function isAuthSurface(pathname) {
|
|
77
|
+
return pathname.startsWith(AUTH_PREFIX) || pathname === '/login' || pathname.startsWith('/login/');
|
|
78
|
+
}
|
|
71
79
|
/**
|
|
72
80
|
* Synthetic, unreachable base. Only ever used as the resolution origin for the
|
|
73
81
|
* comparison below - never emitted, never navigated to. `.invalid` is reserved
|
|
@@ -95,8 +103,13 @@ function safeCallbackPath(raw, fallback = exports.DEFAULT_CALLBACK) {
|
|
|
95
103
|
if (url.origin !== BASE)
|
|
96
104
|
return fallback;
|
|
97
105
|
// Loopbacks into the auth surface cause redirect cycles.
|
|
98
|
-
if (url.pathname
|
|
106
|
+
if (isAuthSurface(url.pathname))
|
|
99
107
|
return fallback;
|
|
108
|
+
// PAY-2218: `_rsc` is Next's flight cache-buster. Once skipProxyUrlNormalize lets it reach middleware it leaks
|
|
109
|
+
// into return targets (`callbackUrl=/overview?_rsc=abc12`, NightHawk 72013); it is never a meaningful part of a
|
|
110
|
+
// destination. Only touched when present, so every other query keeps its exact spelling.
|
|
111
|
+
if (url.searchParams.has('_rsc'))
|
|
112
|
+
url.searchParams.delete('_rsc');
|
|
100
113
|
// The parser's normalised output - control characters already stripped.
|
|
101
114
|
const candidate = url.pathname + url.search + url.hash;
|
|
102
115
|
// *** SECOND RESOLUTION. DO NOT DELETE THIS AS REDUNDANT - IT IS NOT. ***
|
|
@@ -138,7 +151,7 @@ function safeCallbackPath(raw, fallback = exports.DEFAULT_CALLBACK) {
|
|
|
138
151
|
}
|
|
139
152
|
if (echo.origin !== BASE)
|
|
140
153
|
return fallback;
|
|
141
|
-
if (echo.pathname
|
|
154
|
+
if (isAuthSurface(echo.pathname))
|
|
142
155
|
return fallback;
|
|
143
156
|
if (echo.pathname + echo.search + echo.hash !== candidate)
|
|
144
157
|
return fallback;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE body that writes the session-cookie expiry Set-Cookie headers. Shared by the middleware
|
|
3
|
+
* (create-middleware.ts clearSessionCookies, behind its prefetch guard) and the PAY-2218 session-reset route, so
|
|
4
|
+
* the two clearing sites cannot drift apart on which cookies they expire or with which attributes.
|
|
5
|
+
*/
|
|
6
|
+
import type { NextResponse } from 'next/server';
|
|
7
|
+
export declare function expireSessionCookies(response: NextResponse, requestCookieNames: Iterable<string>): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expireSessionCookies = expireSessionCookies;
|
|
4
|
+
const app_slug_1 = require("../lib/app-slug");
|
|
5
|
+
function expireSessionCookies(response, requestCookieNames) {
|
|
6
|
+
const sessionCookie = (0, app_slug_1.getSessionCookieName)();
|
|
7
|
+
const secureCookie = (0, app_slug_1.getSecureSessionCookieName)();
|
|
8
|
+
// Clear main cookies
|
|
9
|
+
response.cookies.set(sessionCookie, '', { path: '/', expires: new Date(0), httpOnly: true, sameSite: 'lax' });
|
|
10
|
+
response.cookies.set(secureCookie, '', { path: '/', expires: new Date(0), httpOnly: true, sameSite: 'lax', secure: true });
|
|
11
|
+
// Clear any chunked cookies (NextAuth chunks large cookies)
|
|
12
|
+
for (const name of requestCookieNames) {
|
|
13
|
+
if (name.startsWith(`${sessionCookie}.`) || name.startsWith(`${secureCookie}.`)) {
|
|
14
|
+
const isSecure = name.startsWith('__Secure-');
|
|
15
|
+
response.cookies.set(name, '', {
|
|
16
|
+
path: '/',
|
|
17
|
+
expires: new Date(0),
|
|
18
|
+
httpOnly: true,
|
|
19
|
+
sameSite: 'lax',
|
|
20
|
+
...(isSecure && { secure: true })
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const LOGIN_PAGE = "/account-auth/login";
|
|
2
|
+
/** The mount point consumers use: `app/api/auth/session-reset/route.ts` (under /api/auth/, which middleware bypasses). */
|
|
3
|
+
export declare const DEFAULT_SESSION_RESET_ROUTE = "/api/auth/session-reset";
|
|
4
|
+
/** How long a signed reset link stays valid. A real navigation follows the 307 at once; this only bounds replay. */
|
|
5
|
+
export declare const RESET_LINK_TTL_SECONDS = 300;
|
|
6
|
+
/** The purpose label for the derived signing key. Changing it invalidates every outstanding reset link. */
|
|
7
|
+
export declare const RESET_KEY_PURPOSE = "next-mvp/session-reset/v1";
|
|
8
|
+
/** The only `reason` / `error` values the middleware emits on a clearing redirect. Anything else is dropped. */
|
|
9
|
+
export declare const RESET_REASONS: readonly string[];
|
|
10
|
+
export declare const RESET_ERRORS: readonly string[];
|
|
11
|
+
export interface ResetParams {
|
|
12
|
+
callbackUrl: string;
|
|
13
|
+
reason?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
/** The secret the app already signs its session cookie with. Undefined means "cannot sign": callers fall back. */
|
|
17
|
+
export declare function resetSecret(): string | undefined;
|
|
18
|
+
/** The session cookie a reset is bound to: the __Secure- one when present, else the plain one. */
|
|
19
|
+
export declare function boundSessionCookie(get: (name: string) => string | undefined, plainName: string, secureName: string): string | undefined;
|
|
20
|
+
/** Normalise to exactly what the route will honour, so what is signed is what is verified. */
|
|
21
|
+
export declare function normaliseResetParams(raw: {
|
|
22
|
+
callbackUrl?: string | null;
|
|
23
|
+
reason?: string | null;
|
|
24
|
+
error?: string | null;
|
|
25
|
+
}): ResetParams;
|
|
26
|
+
/** What the signature covers. Exported for the key-separation row, which signs it with the RAW secret. */
|
|
27
|
+
export declare function resetPayload(p: ResetParams, exp: number, binding: string): string;
|
|
28
|
+
/** The login URL for these params, in the exact shape the middleware has always emitted. */
|
|
29
|
+
export declare function loginLocation(p: ResetParams): string;
|
|
30
|
+
/**
|
|
31
|
+
* Path + query for the reset route, bound to `sessionCookieValue` (the session cookie on the request being ended).
|
|
32
|
+
* `nowMs` is injectable for tests.
|
|
33
|
+
*/
|
|
34
|
+
export declare function signedResetHref(route: string, p: ResetParams, secret: string, sessionCookieValue: string | undefined, nowMs?: number): Promise<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Read a reset request's query. `signed` is true only for a valid, unexpired signature over the normalised params AND
|
|
37
|
+
* this request's own session cookie (`sessionCookieValue`). With no session cookie there is nothing to clear: false.
|
|
38
|
+
* The params are returned either way: an unsigned request still gets a sensible login redirect, just no clearing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readResetRequest(search: URLSearchParams, secret: string | undefined, sessionCookieValue: string | undefined, nowMs?: number): Promise<{
|
|
41
|
+
params: ResetParams;
|
|
42
|
+
signed: boolean;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESET_ERRORS = exports.RESET_REASONS = exports.RESET_KEY_PURPOSE = exports.RESET_LINK_TTL_SECONDS = exports.DEFAULT_SESSION_RESET_ROUTE = exports.LOGIN_PAGE = void 0;
|
|
4
|
+
exports.resetSecret = resetSecret;
|
|
5
|
+
exports.boundSessionCookie = boundSessionCookie;
|
|
6
|
+
exports.normaliseResetParams = normaliseResetParams;
|
|
7
|
+
exports.resetPayload = resetPayload;
|
|
8
|
+
exports.loginLocation = loginLocation;
|
|
9
|
+
exports.signedResetHref = signedResetHref;
|
|
10
|
+
exports.readResetRequest = readResetRequest;
|
|
11
|
+
/**
|
|
12
|
+
* PAY-2218 PR 2: the hand-off between the middleware and the session-reset route.
|
|
13
|
+
*
|
|
14
|
+
* WHY A ROUTE AT ALL. Next 15.5.x and 16.x (16.2.x without `skipProxyUrlNormalize`) strip every router flight
|
|
15
|
+
* header (`rsc`, `next-router-prefetch`, `next-router-segment-prefetch`, `next-router-state-tree`) from the request
|
|
16
|
+
* handed to middleware, so middleware cannot tell a router prefetch from a real navigation and its prefetch guard is
|
|
17
|
+
* dead. A ROUTE HANDLER does see them, on 15.5.9, 16.1.5 and 16.2.12 (measured with a real Chromium against real
|
|
18
|
+
* `next start` servers, PAY-2218 comments 2026-10-11). So the middleware no longer writes the clearing Set-Cookie
|
|
19
|
+
* itself: it redirects to the reset route, and the route decides.
|
|
20
|
+
*
|
|
21
|
+
* WHY THE ROUTE ANSWERS A PREFETCH WITH 204, NOT A REDIRECT. On 15.5.9 the router CACHES a prefetched redirect chain
|
|
22
|
+
* and the later click reuses it without calling middleware or the route again - so "decline on the prefetch, clear
|
|
23
|
+
* on the real navigation" never clears there. A 204 + no-store gives the router nothing to cache, so the real click
|
|
24
|
+
* reaches the route and clears (measured 2/2 on 15.5.9 and 16.2.12; the 307 mutant never clears on 15.5.9).
|
|
25
|
+
*
|
|
26
|
+
* WHY SIGNED. The route clears cookies on a GET. Unsigned, any page could link a signed-in user to it and log them
|
|
27
|
+
* out. The middleware signs (callbackUrl, reason, error, exp, session binding); the route clears only on a valid,
|
|
28
|
+
* unexpired signature and otherwise just sends the user to the login page with the cookies untouched.
|
|
29
|
+
*
|
|
30
|
+
* KEY SEPARATION (BAPert 72219). The signing key is DERIVED - HMAC(authSecret, 'next-mvp/session-reset/v1') - never
|
|
31
|
+
* the raw auth secret, so no value the app signs with that secret for any other purpose can pass as a reset token.
|
|
32
|
+
*
|
|
33
|
+
* SESSION BINDING (BAPert 72219). The signature covers SHA-256 of the session cookie the redirect was issued FOR. The
|
|
34
|
+
* route recomputes it from ITS OWN request's cookie and clears only on a match, so a token captured from one user
|
|
35
|
+
* clears nothing when sent to another (logout-CSRF), and a second use is a no-op (the first use cleared the cookie it
|
|
36
|
+
* was bound to). The hash never travels in the URL; it is only an input to the signature.
|
|
37
|
+
*
|
|
38
|
+
* WHY THE ROUTE REBUILDS THE LOGIN URL. The route never redirects to a URL it was handed. It takes `callbackUrl`
|
|
39
|
+
* (through safeCallbackPath), `reason` and `error` (allowlisted) and builds `${LOGIN_PAGE}?...` itself, so it cannot
|
|
40
|
+
* become an open redirect whatever the query says.
|
|
41
|
+
*
|
|
42
|
+
* Edge-safe: Web Crypto only (middleware runs on the edge runtime on 15.5.x).
|
|
43
|
+
*/
|
|
44
|
+
const safe_callback_1 = require("./safe-callback");
|
|
45
|
+
exports.LOGIN_PAGE = '/account-auth/login';
|
|
46
|
+
/** The mount point consumers use: `app/api/auth/session-reset/route.ts` (under /api/auth/, which middleware bypasses). */
|
|
47
|
+
exports.DEFAULT_SESSION_RESET_ROUTE = '/api/auth/session-reset';
|
|
48
|
+
/** How long a signed reset link stays valid. A real navigation follows the 307 at once; this only bounds replay. */
|
|
49
|
+
exports.RESET_LINK_TTL_SECONDS = 300;
|
|
50
|
+
/** The purpose label for the derived signing key. Changing it invalidates every outstanding reset link. */
|
|
51
|
+
exports.RESET_KEY_PURPOSE = 'next-mvp/session-reset/v1';
|
|
52
|
+
/** The only `reason` / `error` values the middleware emits on a clearing redirect. Anything else is dropped. */
|
|
53
|
+
exports.RESET_REASONS = ['stale', 'invalidated'];
|
|
54
|
+
exports.RESET_ERRORS = ['SessionExpired', 'TwoFactorTimeout'];
|
|
55
|
+
const encoder = new TextEncoder();
|
|
56
|
+
const FIELD_SEPARATOR = String.fromCharCode(10);
|
|
57
|
+
function b64url(bytes) {
|
|
58
|
+
return btoa(String.fromCharCode(...bytes)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
59
|
+
}
|
|
60
|
+
async function hmacBytes(key, message) {
|
|
61
|
+
const k = await crypto.subtle.importKey('raw', key, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
|
|
62
|
+
return new Uint8Array(await crypto.subtle.sign('HMAC', k, encoder.encode(message)));
|
|
63
|
+
}
|
|
64
|
+
/** Sign with the DERIVED key: HMAC(HMAC(authSecret, purpose), message). Never with the raw auth secret. */
|
|
65
|
+
async function sign(secret, message) {
|
|
66
|
+
const derived = await hmacBytes(encoder.encode(secret), exports.RESET_KEY_PURPOSE);
|
|
67
|
+
return b64url(await hmacBytes(derived, message));
|
|
68
|
+
}
|
|
69
|
+
/** SHA-256 of the session cookie value, b64url. No session cookie binds to the empty string. */
|
|
70
|
+
async function sessionBinding(sessionCookieValue) {
|
|
71
|
+
if (!sessionCookieValue)
|
|
72
|
+
return '';
|
|
73
|
+
return b64url(new Uint8Array(await crypto.subtle.digest('SHA-256', encoder.encode(sessionCookieValue))));
|
|
74
|
+
}
|
|
75
|
+
/** Constant-time over equal lengths, and unequal lengths never match. */
|
|
76
|
+
function sameString(a, b) {
|
|
77
|
+
if (a.length !== b.length)
|
|
78
|
+
return false;
|
|
79
|
+
let diff = 0;
|
|
80
|
+
for (let i = 0; i < a.length; i++)
|
|
81
|
+
diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
82
|
+
return diff === 0;
|
|
83
|
+
}
|
|
84
|
+
/** The secret the app already signs its session cookie with. Undefined means "cannot sign": callers fall back. */
|
|
85
|
+
function resetSecret() {
|
|
86
|
+
return process.env.BETTER_AUTH_SECRET || process.env.NEXTAUTH_SECRET || undefined;
|
|
87
|
+
}
|
|
88
|
+
/** The session cookie a reset is bound to: the __Secure- one when present, else the plain one. */
|
|
89
|
+
function boundSessionCookie(get, plainName, secureName) {
|
|
90
|
+
return get(secureName) || get(plainName) || undefined;
|
|
91
|
+
}
|
|
92
|
+
/** Normalise to exactly what the route will honour, so what is signed is what is verified. */
|
|
93
|
+
function normaliseResetParams(raw) {
|
|
94
|
+
const out = { callbackUrl: (0, safe_callback_1.safeCallbackPath)(raw.callbackUrl ?? '') };
|
|
95
|
+
if (raw.reason && exports.RESET_REASONS.includes(raw.reason))
|
|
96
|
+
out.reason = raw.reason;
|
|
97
|
+
if (raw.error && exports.RESET_ERRORS.includes(raw.error))
|
|
98
|
+
out.error = raw.error;
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
/** What the signature covers. Exported for the key-separation row, which signs it with the RAW secret. */
|
|
102
|
+
function resetPayload(p, exp, binding) {
|
|
103
|
+
return ['v2', p.callbackUrl, p.reason ?? '', p.error ?? '', String(exp), binding].join(FIELD_SEPARATOR);
|
|
104
|
+
}
|
|
105
|
+
/** The login URL for these params, in the exact shape the middleware has always emitted. */
|
|
106
|
+
function loginLocation(p) {
|
|
107
|
+
let loc = `${exports.LOGIN_PAGE}?callbackUrl=${encodeURIComponent(p.callbackUrl)}`;
|
|
108
|
+
if (p.reason)
|
|
109
|
+
loc += `&reason=${p.reason}`;
|
|
110
|
+
if (p.error)
|
|
111
|
+
loc += `&error=${p.error}`;
|
|
112
|
+
return loc;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Path + query for the reset route, bound to `sessionCookieValue` (the session cookie on the request being ended).
|
|
116
|
+
* `nowMs` is injectable for tests.
|
|
117
|
+
*/
|
|
118
|
+
async function signedResetHref(route, p, secret, sessionCookieValue, nowMs = Date.now()) {
|
|
119
|
+
const exp = Math.floor(nowMs / 1000) + exports.RESET_LINK_TTL_SECONDS;
|
|
120
|
+
const q = new URLSearchParams({ callbackUrl: p.callbackUrl });
|
|
121
|
+
if (p.reason)
|
|
122
|
+
q.set('reason', p.reason);
|
|
123
|
+
if (p.error)
|
|
124
|
+
q.set('error', p.error);
|
|
125
|
+
q.set('exp', String(exp));
|
|
126
|
+
q.set('sig', await sign(secret, resetPayload(p, exp, await sessionBinding(sessionCookieValue))));
|
|
127
|
+
return `${route}?${q.toString()}`;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Read a reset request's query. `signed` is true only for a valid, unexpired signature over the normalised params AND
|
|
131
|
+
* this request's own session cookie (`sessionCookieValue`). With no session cookie there is nothing to clear: false.
|
|
132
|
+
* The params are returned either way: an unsigned request still gets a sensible login redirect, just no clearing.
|
|
133
|
+
*/
|
|
134
|
+
async function readResetRequest(search, secret, sessionCookieValue, nowMs = Date.now()) {
|
|
135
|
+
const params = normaliseResetParams({ callbackUrl: search.get('callbackUrl'), reason: search.get('reason'), error: search.get('error') });
|
|
136
|
+
const sig = search.get('sig');
|
|
137
|
+
const exp = Number(search.get('exp'));
|
|
138
|
+
if (!secret || !sig || !sessionCookieValue || !Number.isInteger(exp) || exp < Math.floor(nowMs / 1000))
|
|
139
|
+
return { params, signed: false };
|
|
140
|
+
// The signature covers the NORMALISED params and THIS request's session, so a tampered value, or the token arriving
|
|
141
|
+
// with a different session cookie (another user, or the same user after signing in again), fails here.
|
|
142
|
+
const want = await sign(secret, resetPayload(params, exp, await sessionBinding(sessionCookieValue)));
|
|
143
|
+
return { params, signed: sameString(sig, want) };
|
|
144
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type FetchLike } from '../../lib/credential-sign-in-client';
|
|
2
|
+
/**
|
|
3
|
+
* PAY-2302 cut 1b: the package's email + password (+ 2FA code) sign-in form.
|
|
4
|
+
*
|
|
5
|
+
* WHY IT EXISTS. The package's own Better Auth instance has no emailAndPassword, so the login page had no credential form
|
|
6
|
+
* (removed 2026-08-02, BAPert 17586: "restore this form together" with the backend that makes it work). This is that pair:
|
|
7
|
+
* the backend is routes/auth/credential-login (+ credential-login-email-code), which the app mounts at
|
|
8
|
+
* /api/auth/admin-login[/email-code]; this component drives it. Moved from the portal's AdminLoginCard (VibeID-Customer-Portal
|
|
9
|
+
* 3d654917), re-styled with the package's own TraditionalAuthSection instead of the portal's AuthCard chrome.
|
|
10
|
+
*
|
|
11
|
+
* MOUNT IT through the login page's slot, so nothing changes for a consumer that does not opt in:
|
|
12
|
+
* <LoginPage altAuthSlot={<CredentialSignInForm />} />
|
|
13
|
+
* (An app that has not mounted the two routes must NOT mount this form: it would be the dead control 17586 removed.)
|
|
14
|
+
*
|
|
15
|
+
* Two steps, the IdP's own contract (an access token with no refresh token means a second factor is outstanding):
|
|
16
|
+
* 'credentials' - email + password
|
|
17
|
+
* 'code' - the 2FA code; the door parks the provisional bearer in an httpOnly cookie, this step resubmits with the code.
|
|
18
|
+
*
|
|
19
|
+
* After success the browser goes to the callbackUrl, passed through safeCallbackPath (same-origin paths only); when the page
|
|
20
|
+
* carries ?return_url (an IdP authorize request) it goes to the app's /api/oauth/resume instead, which resumes that request.
|
|
21
|
+
*/
|
|
22
|
+
interface Props {
|
|
23
|
+
/** Where to go after sign-in. Default: the page's ?callbackUrl, else /dashboard. Always passed through safeCallbackPath. */
|
|
24
|
+
callbackUrl?: string;
|
|
25
|
+
/** Test seam: the fetch used for both doors. */
|
|
26
|
+
fetchImpl?: FetchLike;
|
|
27
|
+
/** Test seam: navigation after success. */
|
|
28
|
+
onSignedIn?: (destination: string) => void;
|
|
29
|
+
showForgotPassword?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function resolveDestination(explicit?: string): string;
|
|
32
|
+
export declare function CredentialSignInForm({ callbackUrl, fetchImpl, onSignedIn, showForgotPassword }: Props): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default CredentialSignInForm;
|