feat: improve QR code for casdoor-app (#3226)

* feat: simplify login url for casdoor-app

* feat: add token check

* fix: improve logic
This commit is contained in:
IZUMI-Zu
2024-09-23 22:27:58 +08:00
committed by GitHub
parent 110dc04179
commit 74543b9533
2 changed files with 41 additions and 16 deletions

View File

@@ -1050,12 +1050,7 @@ class UserEditPage extends React.Component {
<MfaAccountTable
title={i18next.t("user:MFA accounts")}
table={this.state.user.mfaAccounts}
qrUrl={
"casdoor-app://login/into?serverUrl=" + window.location.origin +
"&clientId=" + this.state.application.clientId +
"&organizationName=" + this.state.organizationName +
"&appName=" + this.state.user.signupApplication
}
accessToken={this.props.account?.accessToken}
icon={this.state.user.avatar}
onUpdateTable={(table) => {this.updateUserField("mfaAccounts", table);}}
/>