Using window.location.origin to get redirect-uri for ciam
This commit is contained in:
@@ -21,7 +21,7 @@ export class AuthGuard implements CanActivate {
|
|||||||
if (environment.environment === 'local') {
|
if (environment.environment === 'local') {
|
||||||
void this.router.navigateByUrl(environment.loginUrl);
|
void this.router.navigateByUrl(environment.loginUrl);
|
||||||
} else {
|
} else {
|
||||||
document.location.href = `${environment.loginUrl}&client_id=${environment.clientId}&redirect_uri=${environment.redirectUri}`;
|
document.location.href = `${environment.loginUrl}&client_id=${environment.clientId}&redirect_uri=${window.location.origin}`;
|
||||||
}
|
}
|
||||||
return of(false);
|
return of(false);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
environment: 'api',
|
environment: 'api',
|
||||||
clientId: '5d08c2e4-763e-42f6-b858-24e4773bb83d',
|
clientId: '5d08c2e4-763e-42f6-b858-24e4773bb83d',
|
||||||
redirectUri: 'http://localhost:4200',
|
|
||||||
loginUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/oauth2/authorization?response_type=code&scope=openid',
|
loginUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/oauth2/authorization?response_type=code&scope=openid',
|
||||||
production: false,
|
production: false,
|
||||||
api: {
|
api: {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
environment: 'local',
|
environment: 'local',
|
||||||
clientId: '',
|
clientId: '',
|
||||||
redirectUri: '',
|
|
||||||
loginUrl: '/mock-login',
|
loginUrl: '/mock-login',
|
||||||
production: false,
|
production: false,
|
||||||
api: {
|
api: {
|
||||||
|
|||||||
Reference in New Issue
Block a user