aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutumnVN <htuan03@gmail.com>2023-06-03 12:57:31 -0700
committerGitHub <noreply@github.com>2023-06-03 16:57:31 -0300
commitc9c0ab5acabb07e1a9c699d72c3bbd1b7ffd1738 (patch)
tree7ae7b8b048d27e863f2ccdbc01d76ff7a0b63706
parent7b2bf08b8f47e0340a40aad71b9e89df3c0f5fa8 (diff)
downloadVencord-c9c0ab5acabb07e1a9c699d72c3bbd1b7ffd1738.tar.gz
Vencord-c9c0ab5acabb07e1a9c699d72c3bbd1b7ffd1738.tar.bz2
Vencord-c9c0ab5acabb07e1a9c699d72c3bbd1b7ffd1738.zip
Fix cloud auth [object%20Object] (#1226)
-rw-r--r--src/utils/cloud.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/cloud.tsx b/src/utils/cloud.tsx
index 5f853bd..db48aa7 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();