@nhost/nhost-js 4.2.1-beta0 → 4.2.1-beta1
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/nhost-js/auth.cjs.js +1 -1
- package/dist/nhost-js/auth.cjs.js.map +1 -1
- package/dist/nhost-js/auth.es.js +14 -6
- package/dist/nhost-js/auth.es.js.map +1 -1
- package/dist/nhost-js/storage.cjs.js +1 -1
- package/dist/nhost-js/storage.cjs.js.map +1 -1
- package/dist/nhost-js/storage.es.js +6 -6
- package/dist/nhost-js/storage.es.js.map +1 -1
- package/dist/nhost-js.umd.js +1 -1
- package/dist/nhost-js.umd.js.map +1 -1
- package/dist/src/auth/client.d.ts +21 -0
- package/dist/src/auth/client.d.ts.map +1 -1
- package/dist/src/auth/client.js +19 -8
- package/dist/src/auth/client.js.map +1 -1
- package/dist/src/storage/client.d.ts.map +1 -1
- package/dist/src/storage/client.js +10 -8
- package/dist/src/storage/client.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/nhost-js/auth.es.js
CHANGED
|
@@ -427,9 +427,17 @@ const createAPIClient = (baseURL, chainFunctions = []) => {
|
|
|
427
427
|
};
|
|
428
428
|
};
|
|
429
429
|
const signInProviderURL = (provider, params) => {
|
|
430
|
-
const encodedParameters = params && Object.entries(params).
|
|
431
|
-
|
|
432
|
-
|
|
430
|
+
const encodedParameters = params && Object.entries(params).flatMap(([key, value]) => {
|
|
431
|
+
if (key === "providerSpecificParams") {
|
|
432
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
433
|
+
return Object.entries(value).map(
|
|
434
|
+
([k, v]) => `${k}=${encodeURIComponent(String(v))}`
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
return [`${key}=${encodeURIComponent(String(value))}`];
|
|
438
|
+
}
|
|
439
|
+
const stringValue = Array.isArray(value) ? value.join(",") : typeof value === "object" && value !== null ? JSON.stringify(value) : String(value);
|
|
440
|
+
return [`${key}=${encodeURIComponent(stringValue)}`];
|
|
433
441
|
}).join("&");
|
|
434
442
|
const url = encodedParameters ? `${baseURL}/signin/provider/${provider}?${encodedParameters}` : `${baseURL}/signin/provider/${provider}`;
|
|
435
443
|
return url;
|
|
@@ -885,9 +893,9 @@ const createAPIClient = (baseURL, chainFunctions = []) => {
|
|
|
885
893
|
};
|
|
886
894
|
};
|
|
887
895
|
const verifyTicketURL = (params) => {
|
|
888
|
-
const encodedParameters = params && Object.entries(params).
|
|
889
|
-
const stringValue = Array.isArray(value) ? value.join(",") : typeof value === "object" ? JSON.stringify(value) : value;
|
|
890
|
-
return `${key}=${encodeURIComponent(stringValue)}
|
|
896
|
+
const encodedParameters = params && Object.entries(params).flatMap(([key, value]) => {
|
|
897
|
+
const stringValue = Array.isArray(value) ? value.join(",") : typeof value === "object" && value !== null ? JSON.stringify(value) : String(value);
|
|
898
|
+
return [`${key}=${encodeURIComponent(stringValue)}`];
|
|
891
899
|
}).join("&");
|
|
892
900
|
const url = encodedParameters ? `${baseURL}/verify?${encodedParameters}` : `${baseURL}/verify`;
|
|
893
901
|
return url;
|