Fix cloud auth [object%20Object] (#1226)
This commit is contained in:
parent
7b2bf08b8f
commit
c9c0ab5aca
|
@ -77,14 +77,14 @@ export async function authorizeCloud() {
|
||||||
permissions={0n}
|
permissions={0n}
|
||||||
clientId={clientId}
|
clientId={clientId}
|
||||||
cancelCompletesFlow={false}
|
cancelCompletesFlow={false}
|
||||||
callback={async (callbackUrl: string) => {
|
callback={async ({ location }: any) => {
|
||||||
if (!callbackUrl) {
|
if (!location) {
|
||||||
Settings.cloud.authenticated = false;
|
Settings.cloud.authenticated = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch(callbackUrl, {
|
const res = await fetch(location, {
|
||||||
headers: new Headers({ Accept: "application/json" })
|
headers: new Headers({ Accept: "application/json" })
|
||||||
});
|
});
|
||||||
const { secret } = await res.json();
|
const { secret } = await res.json();
|
||||||
|
|
Loading…
Reference in a new issue