mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Rename redirectUrl to redirectUri.
This commit is contained in:
@ -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>
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
@ -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 = '/';
|
||||
|
Reference in New Issue
Block a user