Fix cloud auth [object%20Object] (#1226)

This commit is contained in:
AutumnVN 2023-06-03 12:57:31 -07:00 committed by GitHub
parent 7b2bf08b8f
commit c9c0ab5aca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();