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
|
//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.
|
//transfer from the main app to the login pages.
|
||||||
.map(url => addFooToQueryParams({ url, value: { foo: 42 } }))
|
.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],
|
[0],
|
||||||
// An event emitter that posts whenever the user interacts with the app
|
// An event emitter that posts whenever the user interacts with the app
|
||||||
// This is to tell if we should allow the token to expires.
|
// 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
|
const isAuthenticated = await keycloakInstance
|
||||||
.init({
|
.init({
|
||||||
"onLoad": "check-sso",
|
onLoad: "check-sso",
|
||||||
"silentCheckSsoRedirectUri": `${window.location.origin}/silent-sso.html`,
|
silentCheckSsoRedirectUri: `${window.location.origin}/silent-sso.html`,
|
||||||
"responseMode": "query",
|
responseMode: "query",
|
||||||
"checkLoginIframe": false,
|
checkLoginIframe: false,
|
||||||
"adapter": createKeycloakAdapter({
|
adapter: createKeycloakAdapter({
|
||||||
"transformUrlBeforeRedirect": url =>
|
transformUrlBeforeRedirect: url =>
|
||||||
[url].map(transformUrlBeforeRedirect).map(
|
[url].map(transformUrlBeforeRedirect).map(
|
||||||
url =>
|
url =>
|
||||||
addParamToUrl({
|
addParamToUrl({
|
||||||
|
@ -73,7 +73,7 @@ async function createKeycloakOidcClient(params: Params): Promise<OidcClient> {
|
||||||
}).newUrl
|
}).newUrl
|
||||||
)[0],
|
)[0],
|
||||||
keycloakInstance,
|
keycloakInstance,
|
||||||
"getRedirectMethod": () => redirectMethod
|
getRedirectMethod: () => redirectMethod
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((error: Error) => error);
|
.catch((error: Error) => error);
|
||||||
|
|
Loading…
Reference in a new issue