Skip to content

Commit

Permalink
The ui-locales is not nessesary
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Aug 7, 2024
1 parent 41a224c commit 0649db8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ export function ContextualizedApp() {

const { logout, goToAuthServer, backFromAuthServer, oidcTokens } = useOidc();

const ui_locales= oidcTokens.decodedIdToken.locale?.[0] ?? "en";

/*
const backFromAuthServer = {
extraQueryParams: {
Expand Down Expand Up @@ -121,8 +119,7 @@ export function ContextualizedApp() {
<Button
onClick={() => goToAuthServer({
extraQueryParams: {
kc_action: "UPDATE_PASSWORD",
ui_locales
kc_action: "UPDATE_PASSWORD"
}
})}
variant="outlined"
Expand Down Expand Up @@ -152,8 +149,7 @@ export function ContextualizedApp() {
<Button
onClick={() => goToAuthServer({
extraQueryParams: {
kc_action: "UPDATE_PROFILE",
ui_locales
kc_action: "UPDATE_PROFILE"
}
})}
variant="outlined"
Expand Down Expand Up @@ -192,8 +188,7 @@ export function ContextualizedApp() {
color="error"
onClick={() => goToAuthServer({
extraQueryParams: {
kc_action: "delete_account",
ui_locales
kc_action: "delete_account"
}
})}
variant="outlined"
Expand Down
5 changes: 1 addition & 4 deletions src/oidc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ export const { OidcProvider, useOidc } = (() => {
publicUrl,
isAuthGloballyRequired,
decodedIdTokenSchema: {
parse: decodedIdToken => decodedIdToken as {
preferred_username: string;
locale?: string[];
}
parse: decodedIdToken => decodedIdToken as { preferred_username: string; }
}
});

Expand Down

0 comments on commit 0649db8

Please sign in to comment.