mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[MNT-21636] Fix redirect URL for viewer (#6564)
* fix redirect URL for viewer * fix unit fix login SSO show when user is logged in * update js-api * remove protractor change
This commit is contained in:
@@ -150,20 +150,21 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
this.initFormFieldsDefault();
|
||||
this.initFormFieldsMessages();
|
||||
|
||||
if (this.authService.isOauth()) {
|
||||
const oauth: OauthConfigModel = this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null);
|
||||
if (oauth && oauth.implicitFlow) {
|
||||
this.implicitFlow = true;
|
||||
}
|
||||
|
||||
if (oauth && oauth.silentLogin && !this.authService.isLoggedIn()) {
|
||||
this.alfrescoApiService.getInstance().oauth2Auth.implicitLogin();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.authService.isLoggedIn()) {
|
||||
this.router.navigate([this.successRoute]);
|
||||
} else {
|
||||
|
||||
if (this.authService.isOauth()) {
|
||||
const oauth: OauthConfigModel = this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null);
|
||||
if (oauth && oauth.implicitFlow) {
|
||||
this.implicitFlow = true;
|
||||
}
|
||||
|
||||
if (oauth && oauth.silentLogin) {
|
||||
this.alfrescoApiService.getInstance().oauth2Auth.implicitLogin();
|
||||
}
|
||||
}
|
||||
|
||||
this.route.queryParams.subscribe((params: Params) => {
|
||||
const url = params['redirectUrl'];
|
||||
const provider = this.appConfig.get<string>(AppConfigValues.PROVIDERS);
|
||||
|
Reference in New Issue
Block a user