mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: make redirectUri token param follow OAuth2 standard (#1796)
* fix: rename token to access_token in implicit flow; change ? in the redirect uri to & * fix typo
This commit is contained in:
@ -334,8 +334,9 @@ class LoginPage extends React.Component {
|
||||
} else if (responseType === "code") {
|
||||
this.postCodeLoginAction(res);
|
||||
} else if (responseType === "token" || responseType === "id_token") {
|
||||
const amendatoryResponseType = responseType === "token" ? "access_token" : responseType;
|
||||
const accessToken = res.data;
|
||||
Setting.goToLink(`${oAuthParams.redirectUri}#${responseType}=${accessToken}?state=${oAuthParams.state}&token_type=bearer`);
|
||||
Setting.goToLink(`${oAuthParams.redirectUri}#${amendatoryResponseType}=${accessToken}&state=${oAuthParams.state}&token_type=bearer`);
|
||||
} else if (responseType === "saml") {
|
||||
if (res.data2.method === "POST") {
|
||||
this.setState({
|
||||
|
Reference in New Issue
Block a user