Skip to content
Snippets Groups Projects
Commit 69288a45 authored by Helmut Hutzler's avatar Helmut Hutzler
Browse files

Fixing Keycloak redirect problem in account-self- deletion feature

parent 3e26ebd1
Branches
No related tags found
No related merge requests found
Pipeline #9554 passed
......@@ -11,7 +11,7 @@ import {environment} from "../../environments/environment";
})
export class AccountSelfDeletionComponent implements OnInit {
private logHeader = '';
private redirectLoction = '';
private redirectLocation = '';
constructor(public accountService: AccountService,
public messageService: MessageService,
) {}
......@@ -25,16 +25,12 @@ export class AccountSelfDeletionComponent implements OnInit {
if we just use /auth this will fails as we get redirect to http://localhaost:4200:/auth
To overcome this we have defined environment.proxyKeycloakURL
*/
if (!environment.production) {
this.redirectLoction = environment.proxyKeycloakURL;
}
else {
this.redirectLoction = environment.keycloakURL;
}
this.redirectLoction = this.redirectLoction + 'realms/RBAC/account/#/personal-info';
console.warn('Now running Page Redirect to : ' + this.redirectLoction);
this.redirectLocation = environment.realKeycloakURL;
this.redirectLocation = this.redirectLocation + 'realms/RBAC/account/#/personal-info';
console.warn(this.logHeader + 'Running Page Redirect to : ' + this.redirectLocation);
//window.location.href = "https://kube-master-h1.informatik.fh-nuernberg.de/auth/realms/RBAC/account/#/personal-info";
window.location.href = this.redirectLoction;
window.location.href = this.redirectLocation;
}
}
......@@ -2,10 +2,9 @@ declare const require: any;
export const environment = {
production: true,
//keycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/auth/',
//apiURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/api',
// Only used for in account-self-deletion.component component for keycloak page redirect
realKeycloakURL: 'http://localhost:8280/auth/',
keycloakURL: '/auth/',
proxyKeycloakURL: '/auth/',
apiURL: '/api',
appVersion: require('../../package.json').version
};
......
......@@ -6,18 +6,16 @@ declare const require: any;
export const environment = {
production: false,
// keycloakURL: 'http://localhost:8280/auth/'
// Only used for in account-self-deletion.component component for keycloak page redirect
realKeycloakURL: 'http://localhost:8280/auth/',
keycloakURL: '/auth/',
// Only used for development in account-self-deletion.component component for page redirect
proxyKeycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/auth/',
// apiURL: 'http://localhost:8080/api',
apiURL: '/api',
appVersion: require('../../package.json').version
};
/*
* For easier debugging in development mode, you can import the following file
* For easier debugging in development mode, yu can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment