Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-admin
Commits
80956839
Commit
80956839
authored
Nov 12, 2020
by
François Agneray
Browse files
Add redirect uri variables
parent
0eb7e3f8
Pipeline
#3400
passed with stages
in 8 minutes
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/auth/store/auth.effects.ts
View file @
80956839
...
...
@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
import
{
from
}
from
'
rxjs
'
;
import
{
switchMap
,
map
,
tap
}
from
'
rxjs/operators
'
;
import
{
Action
}
from
'
@ngrx/store
'
;
import
{
Effect
,
Actions
,
ofType
}
from
'
@ngrx/effects
'
;
import
{
KeycloakService
}
from
'
keycloak-angular
'
;
...
...
@@ -19,13 +18,15 @@ export class AuthEffects {
@
Effect
({
dispatch
:
false
})
loginAction$
=
this
.
actions$
.
pipe
(
ofType
(
authActions
.
LOGIN
),
tap
(
_
=>
this
.
keycloak
.
login
())
tap
(
_
=>
this
.
keycloak
.
login
({
redirectUri
:
window
.
location
.
origin
+
environment
.
ssoLogoutRedirectUri
}))
);
@
Effect
({
dispatch
:
false
})
logoutAction$
=
this
.
actions$
.
pipe
(
ofType
(
authActions
.
LOGOUT
),
tap
(
_
=>
this
.
keycloak
.
logout
(
window
.
location
.
origin
+
'
/login
'
))
tap
(
_
=>
this
.
keycloak
.
logout
(
window
.
location
.
origin
+
environment
.
ssoLogoutRedirectUri
))
);
@
Effect
()
...
...
src/environments/environment.prod.ts
View file @
80956839
...
...
@@ -5,5 +5,7 @@ export const environment = {
settingsUrl
:
'
/settings
'
,
ssoAuthUrl
:
'
https://anis-dev.lam.fr/auth
'
,
ssoRealm
:
'
anis
'
,
ssoClientId
:
'
anis-admin
'
ssoClientId
:
'
anis-admin
'
,
ssoLoginRedirectUri
:
'
/admin
'
,
ssoLogoutRedirectUri
:
'
/admin/login
'
};
src/environments/environment.ts
View file @
80956839
...
...
@@ -9,7 +9,9 @@ export const environment = {
settingsUrl
:
'
http://localhost:8082
'
,
ssoAuthUrl
:
'
http://localhost:8180/auth
'
,
ssoRealm
:
'
anis
'
,
ssoClientId
:
'
anis-admin
'
ssoClientId
:
'
anis-admin
'
,
ssoLoginRedirectUri
:
'
/
'
,
ssoLogoutRedirectUri
:
'
/login
'
};
/*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment