mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix bugs in custom app sso login with WebAuthn authentication (#2457)
Co-authored-by: aidenlu <aiden_lu@wochacha.com>
This commit is contained in:
parent
b320cca789
commit
34b1945180
@ -766,7 +766,11 @@ class LoginPage extends React.Component {
|
|||||||
const rawId = assertion.rawId;
|
const rawId = assertion.rawId;
|
||||||
const sig = assertion.response.signature;
|
const sig = assertion.response.signature;
|
||||||
const userHandle = assertion.response.userHandle;
|
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",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user