fix(core): strict client oauth parameters check (#8159)

This commit is contained in:
forehalo
2024-09-08 12:44:47 +00:00
parent 63e1fce3ca
commit 57083905ff
6 changed files with 69 additions and 25 deletions
@@ -112,6 +112,7 @@ export class AuthService extends Service {
async oauthPreflight(
provider: OAuthProviderType,
client: string,
/** @deprecated*/ redirectUrl?: string
) {
const res = await this.fetchService.fetch('/api/oauth/preflight', {
@@ -131,7 +132,7 @@ export class AuthService extends Service {
'state',
JSON.stringify({
state: oauthUrl.searchParams.get('state'),
client: environment.isElectron ? appInfo?.schema : 'web',
client,
})
);
url = oauthUrl.toString();