mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 09:15:41 +00:00
Add a way to login to OIDC by clicking login button
add a way to login to OIDC by clicking login button through response status 403 Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
20deb45a18
commit
c8b6b41854
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user