From 9bcf739b76468b5685e9046f44d280f293f7b47b Mon Sep 17 00:00:00 2001 From: yoshiki-kamada Date: Thu, 5 Oct 2023 12:24:40 +0900 Subject: [PATCH] Add getIdToken method into keycloak_service.dart file --- lib/src/keycloak_service.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/keycloak_service.dart b/lib/src/keycloak_service.dart index 12cbb92..25b0449 100644 --- a/lib/src/keycloak_service.dart +++ b/lib/src/keycloak_service.dart @@ -79,6 +79,11 @@ class KeycloakService { return this._keycloak.token; } + Future getIdToken([bool forceLogin = false]) async { + await this.updateToken(10); + return this._keycloak.idToken; + } + Future logout([KeycloakLogoutOptions? options]) async { this._keycloak.logout(options); this._userProfile = null;