Rename redirectUrl to redirectUri.

This commit is contained in:
Yang Luo
2021-03-15 00:01:21 +08:00
parent df948e9e34
commit 4e22e0523d
7 changed files with 13 additions and 13 deletions

View File

@ -201,8 +201,8 @@ class ApplicationEditPage extends React.Component {
<Col span={22} >
<UrlTable
title="Redirect URLs"
table={this.state.application.redirectUrls}
onUpdateTable={(value) => { this.updateApplicationField('redirectUrls', value)}}
table={this.state.application.redirectUris}
onUpdateTable={(value) => { this.updateApplicationField('redirectUris', value)}}
/>
</Col>
</Row>

View File

@ -51,7 +51,7 @@ class ApplicationListPage extends React.Component {
logo: "https://cdn.casbin.com/logo/logo_384x96.png",
EnablePassword: true,
providers: [],
redirectUrls: [],
redirectUris: [],
expireInHours: 24 * 7,
}
}

View File

@ -44,8 +44,8 @@ export function logout() {
}).then(res => res.json());
}
export function authLogin(applicationName, providerName, code, state, redirectUrl, method) {
return fetch(`${authConfig.serverUrl}/api/auth/login?application=${applicationName}&provider=${providerName}&code=${code}&state=${state}&redirect_url=${redirectUrl}&method=${method}`, {
export function authLogin(applicationName, providerName, code, state, redirectUri, method) {
return fetch(`${authConfig.serverUrl}/api/auth/login?application=${applicationName}&provider=${providerName}&code=${code}&state=${state}&redirect_url=${redirectUri}&method=${method}`, {
method: 'GET',
credentials: 'include',
}).then(res => res.json());

View File

@ -47,9 +47,9 @@ class AuthCallback extends React.Component {
}
authLogin() {
let redirectUrl;
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)
let redirectUri;
redirectUri = `${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, redirectUri, this.state.method)
.then((res) => {
if (res.status === "ok") {
window.location.href = '/';