Hi guys, I got this issue when trying to get the authorization code returned by KeyCloak.Environment
Current Flow
https:/xxx.outsystems.app/auth/realms/.../protocol/openid-connect/auth?client_id=client_runtime&scope=openid&redirect_uri=app.xxx.mobile.dev://xxx-dev.outsystems.app/Android/Mobile/_RedirectLogin&response_type=code...
Issue Observed
When KeycloakOAuthCallback is opened after the initial login, the URL is:
https:///Mobile/KeycloakOAuthCallback
No authorization code is present.
We have verified this using:
The URL never changes and no code parameter becomes available.
This behavior is consistent across Android, iOS, and Web.
Additional Observation
When our callback logic detects that no authorization code is present, we currently trigger a second authentication request directly to Keycloak using:
https://xxxx/realms/xxxxs/protocol/openid-connect/auth?client_id=xxx&redirect_uri=xxxx://Mobile/KeycloakOAuthCallback&scope=openid&response_type=code...
In this second flow:
After this second authentication request, our callback screen receives:
https:///Mobile/KeycloakOAuthCallback?code=...
and we are able to successfully retrieve the authorization code.
Our Understanding
Based on our investigation, we suspect the following sequence may be occurring:
Could you please confirm whether this understanding is correct?
Business Requirement
We require both:
Questions
We would appreciate any guidance or recommended implementation pattern for this scenario.
Thank you for your support.
Kind regards,