diff --git a/frontend/src/routes/OAuth2FA.svelte b/frontend/src/routes/OAuth2FA.svelte index 2eaf565..a9218e6 100644 --- a/frontend/src/routes/OAuth2FA.svelte +++ b/frontend/src/routes/OAuth2FA.svelte @@ -32,7 +32,7 @@ method: 'POST', headers: { 'Content-Type': 'application/json', - 'Accept': 'application/json' + Accept: 'application/json' }, body: JSON.stringify({ request_uri: requestUri, @@ -50,6 +50,11 @@ if (data.redirect_uri) { window.location.href = data.redirect_uri + const a = document.createElement('a') + a.href = data.redirect_uri + a.style.display = 'none' + document.body.appendChild(a) + a.click() return } diff --git a/frontend/src/routes/OAuthAccounts.svelte b/frontend/src/routes/OAuthAccounts.svelte index 013b3e9..29289e1 100644 --- a/frontend/src/routes/OAuthAccounts.svelte +++ b/frontend/src/routes/OAuthAccounts.svelte @@ -58,7 +58,7 @@ method: 'POST', headers: { 'Content-Type': 'application/json', - 'Accept': 'application/json' + Accept: 'application/json' }, body: JSON.stringify({ request_uri: requestUri, @@ -80,12 +80,19 @@ } if (data.needs_2fa) { - navigate(routes.oauth2fa, { params: { request_uri: requestUri, channel: data.channel || '' } }) + navigate(routes.oauth2fa, { + params: { request_uri: requestUri, channel: data.channel || '' } + }) return } if (data.redirect_uri) { window.location.href = data.redirect_uri + const a = document.createElement('a') + a.href = data.redirect_uri + a.style.display = 'none' + document.body.appendChild(a) + a.click() return } @@ -128,12 +135,7 @@
{#each accounts as account} -