@payez/next-mvp 4.0.9 → 4.0.10

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.
@@ -352,17 +352,10 @@ async function ensureFreshToken(request) {
352
352
  // immediately available in Vibe's JWKS cache
353
353
  await delay(KEY_PROPAGATION_DELAY_MS);
354
354
  }
355
- // 6. Validate we have a token
356
- if (!sessionData.idpAccessToken) {
357
- return {
358
- success: false,
359
- error: 'NO_TOKEN',
360
- message: 'No access token available',
361
- };
362
- }
355
+ // 6. Return session accessToken may be empty for social-only OAuth sessions
363
356
  return {
364
357
  success: true,
365
- accessToken: sessionData.idpAccessToken,
358
+ accessToken: sessionData.idpAccessToken || '',
366
359
  sessionData,
367
360
  };
368
361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payez/next-mvp",
3
- "version": "4.0.9",
3
+ "version": "4.0.10",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -426,18 +426,10 @@ export async function ensureFreshToken(
426
426
  await delay(KEY_PROPAGATION_DELAY_MS);
427
427
  }
428
428
 
429
- // 6. Validate we have a token
430
- if (!sessionData.idpAccessToken) {
431
- return {
432
- success: false,
433
- error: 'NO_TOKEN',
434
- message: 'No access token available',
435
- };
436
- }
437
-
429
+ // 6. Return session accessToken may be empty for social-only OAuth sessions
438
430
  return {
439
431
  success: true,
440
- accessToken: sessionData.idpAccessToken,
432
+ accessToken: sessionData.idpAccessToken || '',
441
433
  sessionData,
442
434
  };
443
435
  } catch (error) {