diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index c0f7b3ee..5f315f23 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -766,7 +766,11 @@ class LoginPage extends React.Component { const rawId = assertion.rawId; const sig = assertion.response.signature; const userHandle = assertion.response.userHandle; - return fetch(`${Setting.ServerUrl}/api/webauthn/signin/finish?responseType=${values["type"]}`, { + let finishUrl = `${Setting.ServerUrl}/api/webauthn/signin/finish?responseType=${values["type"]}`; + if (values["type"] === "code") { + finishUrl = `${Setting.ServerUrl}/api/webauthn/signin/finish?responseType=${values["type"]}&clientId=${oAuthParams.clientId}&scope=${oAuthParams.scope}&redirectUri=${oAuthParams.redirectUri}&nonce=${oAuthParams.nonce}&state=${oAuthParams.state}&codeChallenge=${oAuthParams.codeChallenge}&challengeMethod=${oAuthParams.challengeMethod}`; + } + return fetch(finishUrl, { method: "POST", credentials: "include", body: JSON.stringify({