Skip to content

Commit

Permalink
Merge pull request #460 from UKP-SQuARE/fix_keycloack_local
Browse files Browse the repository at this point in the history
keycloack working in local deployment
  • Loading branch information
timbmg authored Mar 20, 2023
2 parents 91c92e3 + 2f7fb11 commit 75aa78d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ let initOptions = {
}
let keycloak = Keycloak(initOptions)
keycloak.init({
onLoad: initOptions.onLoad,
silentCheckSsoRedirectUri: initOptions.silentCheckSsoRedirectUri,
checkLoginIframe: false,
}).then((authenticated) => {
if (process.env.VUE_APP_AUTH_TOKEN !== '') {
keycloak.authenticated = true
authenticated = true
keycloak.token = process.env.VUE_APP_AUTH_TOKEN
store.dispatch('signIn', { userInfo: {'preferred_username': 'LOCAL_SQUARE_USER'}, token: process.env.VUE_APP_AUTH_TOKEN })
store.dispatch('signIn', { userInfo: { 'preferred_username': 'LOCAL_SQUARE_USER' }, token: process.env.VUE_APP_AUTH_TOKEN })
} else if (authenticated) {
keycloak.loadUserInfo().then(userInfo => {
store.dispatch('signIn', { userInfo: userInfo, token: keycloak.token })
Expand Down

0 comments on commit 75aa78d

Please sign in to comment.