Homogeneous syntax
This commit is contained in:
parent
79d92dd2b5
commit
00059fbb80
@ -19,7 +19,7 @@ const { OidcClientProvider } = createOidcClientProvider({
|
||||
//Instead of foo and bar you could have isDark for example or any other state that you wish to
|
||||
//transfer from the main app to the login pages.
|
||||
.map(url => addFooToQueryParams({ url, value: { foo: 42 } }))
|
||||
.map(url => addBarToQueryParams({ url, "value": "value of bar transferred to login page" }))
|
||||
.map(url => addBarToQueryParams({ url, value: "value of bar transferred to login page" }))
|
||||
[0],
|
||||
// An event emitter that posts whenever the user interacts with the app
|
||||
// This is to tell if we should allow the token to expires.
|
||||
|
@ -58,12 +58,12 @@ async function createKeycloakOidcClient(params: Params): Promise<OidcClient> {
|
||||
|
||||
const isAuthenticated = await keycloakInstance
|
||||
.init({
|
||||
"onLoad": "check-sso",
|
||||
"silentCheckSsoRedirectUri": `${window.location.origin}/silent-sso.html`,
|
||||
"responseMode": "query",
|
||||
"checkLoginIframe": false,
|
||||
"adapter": createKeycloakAdapter({
|
||||
"transformUrlBeforeRedirect": url =>
|
||||
onLoad: "check-sso",
|
||||
silentCheckSsoRedirectUri: `${window.location.origin}/silent-sso.html`,
|
||||
responseMode: "query",
|
||||
checkLoginIframe: false,
|
||||
adapter: createKeycloakAdapter({
|
||||
transformUrlBeforeRedirect: url =>
|
||||
[url].map(transformUrlBeforeRedirect).map(
|
||||
url =>
|
||||
addParamToUrl({
|
||||
@ -73,7 +73,7 @@ async function createKeycloakOidcClient(params: Params): Promise<OidcClient> {
|
||||
}).newUrl
|
||||
)[0],
|
||||
keycloakInstance,
|
||||
"getRedirectMethod": () => redirectMethod
|
||||
getRedirectMethod: () => redirectMethod
|
||||
})
|
||||
})
|
||||
.catch((error: Error) => error);
|
||||
|
Loading…
Reference in New Issue
Block a user