Skip to content

Commit 640b5b1

Browse files
committed
Update Keycloak 26
1 parent f4263bc commit 640b5b1

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

package-lock.json

Lines changed: 5 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"i18next": "^23.14.0",
9393
"i18next-browser-languagedetector": "^8.0.0",
9494
"i18next-http-backend": "^2.6.1",
95-
"keycloak-js": "^23.0.7",
95+
"keycloak-js": "^26",
9696
"numeral": "^2.0.6",
9797
"react": "^18",
9898
"react-dom": "^18",

src/services/keycloakService.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@ export class KeycloakService {
5555
});
5656
}
5757

58-
public logout(redirectUri?: string): void {
59-
KeycloakService.keycloakAuth.logout({ redirectUri: redirectUri });
58+
public logout(redirectUri?: string): Promise<void> {
59+
return new Promise<void>((resolve, reject) => {
60+
KeycloakService.keycloakAuth
61+
.logout({ redirectUri: redirectUri })
62+
.then(() => {
63+
resolve();
64+
})
65+
.catch(() => {
66+
reject();
67+
});
68+
});
6069
}
6170

6271
public account(): void {

0 commit comments

Comments
 (0)