From c9c0ab5acabb07e1a9c699d72c3bbd1b7ffd1738 Mon Sep 17 00:00:00 2001 From: AutumnVN Date: Sat, 3 Jun 2023 12:57:31 -0700 Subject: [PATCH] Fix cloud auth [object%20Object] (#1226) --- src/utils/cloud.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/cloud.tsx b/src/utils/cloud.tsx index 5f853bd30..db48aa7f8 100644 --- a/src/utils/cloud.tsx +++ b/src/utils/cloud.tsx @@ -77,14 +77,14 @@ export async function authorizeCloud() { permissions={0n} clientId={clientId} cancelCompletesFlow={false} - callback={async (callbackUrl: string) => { - if (!callbackUrl) { + callback={async ({ location }: any) => { + if (!location) { Settings.cloud.authenticated = false; return; } try { - const res = await fetch(callbackUrl, { + const res = await fetch(location, { headers: new Headers({ Accept: "application/json" }) }); const { secret } = await res.json();