@payez/next-mvp 4.0.30 → 4.0.32
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/auth/better-auth.js
CHANGED
|
@@ -243,7 +243,7 @@ async function exchangeOAuthForIdpTokens(sessionToken, provider = 'google') {
|
|
|
243
243
|
headers: { 'Content-Type': 'application/json' },
|
|
244
244
|
body: JSON.stringify({
|
|
245
245
|
provider,
|
|
246
|
-
provider_account_id:
|
|
246
|
+
provider_account_id: email, // Cross-System Identity Standard v1.1: always use verified email, never opaque session IDs
|
|
247
247
|
email,
|
|
248
248
|
name,
|
|
249
249
|
image,
|
|
@@ -269,7 +269,7 @@ async function exchangeOAuthForIdpTokens(sessionToken, provider = 'google') {
|
|
|
269
269
|
return false;
|
|
270
270
|
}
|
|
271
271
|
// Build IDP token data
|
|
272
|
-
const requiresTwoFactor = result.user?.requiresTwoFactor ?? result.requiresTwoFactor ?? false;
|
|
272
|
+
const requiresTwoFactor = result.requires_two_factor ?? result.user?.requiresTwoFactor ?? result.requiresTwoFactor ?? false;
|
|
273
273
|
const idpTokenData = {
|
|
274
274
|
idpAccessToken: result.access_token,
|
|
275
275
|
idpRefreshToken: result.refresh_token,
|
package/package.json
CHANGED
package/src/auth/better-auth.ts
CHANGED
|
@@ -236,7 +236,7 @@ export async function exchangeOAuthForIdpTokens(
|
|
|
236
236
|
headers: { 'Content-Type': 'application/json' },
|
|
237
237
|
body: JSON.stringify({
|
|
238
238
|
provider,
|
|
239
|
-
provider_account_id:
|
|
239
|
+
provider_account_id: email, // Cross-System Identity Standard v1.1: always use verified email, never opaque session IDs
|
|
240
240
|
email,
|
|
241
241
|
name,
|
|
242
242
|
image,
|
|
@@ -262,7 +262,7 @@ export async function exchangeOAuthForIdpTokens(
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// Build IDP token data
|
|
265
|
-
const requiresTwoFactor = result.user?.requiresTwoFactor ?? result.requiresTwoFactor ?? false;
|
|
265
|
+
const requiresTwoFactor = result.requires_two_factor ?? result.user?.requiresTwoFactor ?? result.requiresTwoFactor ?? false;
|
|
266
266
|
const idpTokenData = {
|
|
267
267
|
idpAccessToken: result.access_token,
|
|
268
268
|
idpRefreshToken: result.refresh_token,
|