Clean up oidc config
This commit is contained in:
1 parent
aa768c7fd4
commit
f495ccfa3f
4 files changed
+15
-44
No files matched your search
@@ -4,6 +4,7 @@ import { loadUser, createUserManager } from 'redux-oidc'
|
||||
/**
|
||||
* Creates a userManager from oidcSettings;
|
||||
* loads the user into the provided redux store
|
||||
* LINK: https://github.com/IdentityModel/oidc-client-js/wiki#configuration
|
||||
*
|
||||
* @param {*} store
|
||||
* @param {Object} oidcSettings
|
||||
@@ -19,29 +20,13 @@ export default function(store, oidcSettings) {
|
||||
return
|
||||
}
|
||||
|
||||
const {
|
||||
authServerUrl,
|
||||
clientId,
|
||||
authRedirectUri,
|
||||
postLogoutRedirectUri,
|
||||
responseType,
|
||||
extraQueryParams,
|
||||
} = oidcSettings
|
||||
|
||||
const settings = {
|
||||
authority: authServerUrl,
|
||||
client_id: clientId,
|
||||
redirect_uri: authRedirectUri,
|
||||
...oidcSettings,
|
||||
silent_redirect_uri: '/silent-refresh.html',
|
||||
post_logout_redirect_uri: postLogoutRedirectUri,
|
||||
response_type: responseType,
|
||||
// Note: Request must have scope 'openid' to be considered an OpenID Connect request
|
||||
scope: 'email profile openid',
|
||||
automaticSilentRenew: true,
|
||||
revokeAccessTokenOnSignout: true,
|
||||
filterProtocolClaims: true,
|
||||
loadUserInfo: true,
|
||||
extraQueryParams: extraQueryParams,
|
||||
}
|
||||
|
||||
const userManager = createUserManager(settings)
|
||||
|
||||
Reference in new issue
Block a user