Merge pull request #7782 from jwangyangls/add_oidc_login_control_redirect

Add a way to login to OIDC by clicking login button
This commit is contained in:
Mia ZHOU 2019-05-14 13:34:44 +08:00 committed by GitHub
commit f807c3392f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,6 +259,16 @@ export class SignInComponent implements AfterViewChecked, OnInit {
this.router.navigateByUrl(this.redirectUrl);
}
}, error => {
// 403 oidc login no body;
if (this.isOidcLoginMode && error && error.status === 403) {
try {
let redirect_location = '';
redirect_location = error._body && error._body.redirect_location ?
error._body.redirect_location : JSON.parse(error._body).redirect_location;
window.location.href = redirect_location;
return;
} catch (error) { }
}
this.handleError(error);
});
}