mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[mastodon-client] Preserve state parameter during OAuth
This fixes login with clients that require the state parameter to be preserved during /oauth/authorize.
This commit is contained in:
parent
89bc799765
commit
58137c9482
@ -105,6 +105,7 @@ const props = defineProps<{
|
|||||||
scope?: string;
|
scope?: string;
|
||||||
force_login?: boolean;
|
force_login?: boolean;
|
||||||
lang?: string;
|
lang?: string;
|
||||||
|
state?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const _scopes = props.scope?.split(" ")?.filter(p => p.length > 0) ?? ['read'];
|
const _scopes = props.scope?.split(" ")?.filter(p => p.length > 0) ?? ['read'];
|
||||||
@ -165,6 +166,7 @@ async function accept(): Promise<void> {
|
|||||||
redirectUri,
|
redirectUri,
|
||||||
query({
|
query({
|
||||||
code: res.code,
|
code: res.code,
|
||||||
|
state: props.state,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,8 @@ export const routes = [
|
|||||||
redirect_uri: "redirect_uri",
|
redirect_uri: "redirect_uri",
|
||||||
scope: "scope",
|
scope: "scope",
|
||||||
force_login: "force_login",
|
force_login: "force_login",
|
||||||
lang: "lang"
|
lang: "lang",
|
||||||
|
state: "state",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user