You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to Get Keycloak Active Session from Access Token
#36960
I have a Flutter app that authenticates users via Keycloak's OAuth2 flow by opening a WebView. The app retrieves an access token from the /token endpoint, which is then used to access backend resources.
Goal
I want to allow users to update their password by clicking a native Flutter button, which will open a Keycloak-required action via Application Initiated Action (AIA) in a WebView.
Challenge
For a seamless experience, users should be redirected directly to the update_password required action without being forced to log in again. This requires an active session cookie in the WebView.
Issues:
If an active session exists in the WebView, the user is redirected to update_password directly.
If there is no active session, the user is forced to log in before seeing the password update page, which I want to avoid.
Question
Is there a way to convert the JWT access token into an active session cookie and inject it into the WebView, allowing users to directly trigger the required actions via AIA without re-authentication?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I have a Flutter app that authenticates users via Keycloak's OAuth2 flow by opening a WebView. The app retrieves an access token from the
/tokenendpoint, which is then used to access backend resources.Goal
I want to allow users to update their password by clicking a native Flutter button, which will open a Keycloak-required action via Application Initiated Action (AIA) in a WebView.
Challenge
For a seamless experience, users should be redirected directly to the
update_passwordrequired action without being forced to log in again. This requires an active session cookie in the WebView.Issues:
update_passworddirectly.Question
Is there a way to convert the JWT access token into an active session cookie and inject it into the WebView, allowing users to directly trigger the required actions via AIA without re-authentication?
All reactions