env
This commit is contained in:
parent
69a5c183e0
commit
68beedb4c8
3
.env
Normal file
3
.env
Normal file
@ -0,0 +1,3 @@
|
||||
KC_URL="https://auth-dev.csi.wmi.amu.edu.pl/"
|
||||
KC_REALM="gonito-dev"
|
||||
KC_CLIENT_ID="gonito-dev-heroku"
|
@ -9,3 +9,7 @@ App will work on port 3001.
|
||||
## Stop app
|
||||
|
||||
`docker-compose stop`
|
||||
|
||||
## Keycloak
|
||||
|
||||
Set variables in *.env* to choose keycloak connect.
|
@ -1,23 +1,11 @@
|
||||
import Keycloak from 'keycloak-js';
|
||||
|
||||
// const _kc = new Keycloak({
|
||||
// url: 'https://auth-dev.csi.wmi.amu.edu.pl/',
|
||||
// realm: 'gonito-dev',
|
||||
// clientId: 'gonito-dev-localhost'
|
||||
// });
|
||||
|
||||
const _kc = new Keycloak({
|
||||
url: 'https://auth-dev.csi.wmi.amu.edu.pl/',
|
||||
realm: 'gonito-dev',
|
||||
clientId: 'gonito-dev-heroku'
|
||||
url: process.env.KC_URL,
|
||||
realm: process.env.KC_REALM,
|
||||
clientId: process.env.KC_CLIENT_ID
|
||||
});
|
||||
|
||||
// const _kc = new Keycloak({
|
||||
// url: 'http://0.0.0.0:8080',
|
||||
// realm: 'test',
|
||||
// clientId: 'test'
|
||||
// });
|
||||
|
||||
const initKeycloak = (onAuthenticatedCallback) => {
|
||||
_kc.init({
|
||||
onLoad: 'check-sso',
|
||||
|
Loading…
Reference in New Issue
Block a user