initKeycloak
react / services/keycloakService / initKeycloak
Function: initKeycloak()
initKeycloak():
Promise
<boolean
>
Defined in: services/keycloakService.ts:36
Initializes the Keycloak instance and performs login if necessary.
- Saves the token to session storage after login.
- Automatically attempts to refresh the token every 30 seconds if expired.
Returns
Promise
<boolean
>
A promise that resolves to true
if authenticated, otherwise false
.