Check user under org.

This commit is contained in:
Yang Luo
2021-02-14 21:21:42 +08:00
parent 7203dcbe22
commit 65eee22099
11 changed files with 64 additions and 38 deletions

View File

@ -23,7 +23,7 @@ class AuthCallback extends React.Component {
const params = new URLSearchParams(this.props.location.search);
this.state = {
classes: props,
providerType: props.match.params.providerType,
applicationName: props.match.params.applicationName,
providerName: props.match.params.providerName,
method: props.match.params.method,
state: params.get("state"),
@ -48,8 +48,8 @@ class AuthCallback extends React.Component {
authLogin() {
let redirectUrl;
redirectUrl = `${window.location.origin}/callback/${this.state.providerType}/${this.state.providerName}/${this.state.method}`;
AuthBackend.authLogin(this.state.providerName, this.state.code, this.state.state, redirectUrl, this.state.method)
redirectUrl = `${window.location.origin}/callback/${this.state.applicationName}/${this.state.providerName}/${this.state.method}`;
AuthBackend.authLogin(this.state.applicationName, this.state.providerName, this.state.code, this.state.state, redirectUrl, this.state.method)
.then((res) => {
if (res.status === "ok") {
window.location.href = '/';