@payez/next-mvp 4.0.12 → 4.0.13

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.
@@ -153,7 +153,7 @@ function createBetterAuthInstance(idpConfig) {
153
153
  catch {
154
154
  return;
155
155
  }
156
- const result = idpData?.data?.result || idpData?.result || idpData;
156
+ const result = idpData?.data?.result || idpData?.data || idpData;
157
157
  if (!result?.access_token) {
158
158
  console.warn('[BETTER_AUTH] IDP oauth-callback returned no access_token. Keys:', Object.keys(result || {}));
159
159
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payez/next-mvp",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -163,7 +163,7 @@ export function createBetterAuthInstance(idpConfig: IDPClientConfig) {
163
163
 
164
164
  let idpData: any;
165
165
  try { idpData = JSON.parse(oauthResText); } catch { return; }
166
- const result = idpData?.data?.result || idpData?.result || idpData;
166
+ const result = idpData?.data?.result || idpData?.data || idpData;
167
167
 
168
168
  if (!result?.access_token) {
169
169
  console.warn('[BETTER_AUTH] IDP oauth-callback returned no access_token. Keys:', Object.keys(result || {}));