isLoggedIn method

Future<bool> isLoggedIn()

Check if user is logged in.

@returns A boolean that indicates if the user is logged in.

Implementation

Future<bool> isLoggedIn() async {
  try {
    if (!this._keycloak.authenticated) {
      return false;
    }
    await this.updateToken(20);
    return true;
  } catch (error) {
    return false;
  }
}