Skip to content

Commit

Permalink
Merge pull request #78 from perarnborg/feature/automatic-signin-setting
Browse files Browse the repository at this point in the history
Add automaticSilentSignin config
  • Loading branch information
perarnborg authored Feb 6, 2020
2 parents 815587a + 9de5e47 commit ff9baf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/services/oidc-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { UserManager, WebStorageStateStore } from 'oidc-client'

const defaultOidcConfig = {
userStore: new WebStorageStateStore(),
loadUserInfo: true
loadUserInfo: true,
automaticSilentSignin: true
}

const requiredConfigProperties = [
Expand Down
2 changes: 1 addition & 1 deletion src/store/create-store-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default (oidcSettings, storeSettings = {}, oidcEventListeners = {}) => {
context.commit('unsetOidcAuth')
}
if (routeIsPublic(route)) {
if (oidcConfig.silent_redirect_uri) {
if (oidcConfig.silent_redirect_uri && oidcConfig.automaticSilentSignin) {
context.dispatch('authenticateOidcSilent')
}
} else {
Expand Down

2 comments on commit ff9baf9

@mediafreakch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perarnborg Maybe this should be added to the Wiki?

@perarnborg
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mediafreakch indeed! It will added to the wiki and the issue about this will be closed!

Please sign in to comment.