@rebasepro/client 0.1.2 → 0.2.1
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/LICENSE +21 -6
- package/dist/auth.d.ts +8 -6
- package/dist/index.es.js +2 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -9
- package/src/auth.ts +4 -8
- package/src/index.ts +1 -1
- package/src/transport.ts +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -383,13 +383,12 @@
|
|
|
383
383
|
refreshToken: session.refreshToken
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
async function signInWithGoogle(
|
|
386
|
+
async function signInWithGoogle(payload) {
|
|
387
387
|
const fetchFn = getFetch();
|
|
388
|
-
const body = typeof tokenOrPayload === "string" ? { idToken: tokenOrPayload } : tokenOrPayload;
|
|
389
388
|
const res = await fetchFn(authUrl("/google"), {
|
|
390
389
|
method: "POST",
|
|
391
390
|
headers: { "Content-Type": "application/json" },
|
|
392
|
-
body: JSON.stringify(
|
|
391
|
+
body: JSON.stringify(payload)
|
|
393
392
|
});
|
|
394
393
|
const responseBody = await res.json().catch(() => ({}));
|
|
395
394
|
if (!res.ok) throwApiError(res.status, responseBody, res.statusText);
|