-
Thank you for great work with spring-oddons. I just had once question from: In step 5, you write "If deep linking is correctly configured (Android App link or iOS Smart Link), the response from the authorization server with the authorization code should land in the app" Am I right to assume then that the deep link path matches client (BFF) redirect uri on the authorization server (for example android manifest might have host = quiz.c4-soft.com path=/bff/login/oauth2/code/)? I also assume because the http client is used, the deep links don't trigger when the uri matches the deep link path. I'm relatively new to mobile app dev but plan to implement this with flutter. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@lukepopp, you should read the Stackoverflow answer more carefully.
Yes. Keep in mind that this URI containing the authorization code is provided as
For several reasons (displaying forms, enabling SSO with other apps, ...), the user-agent used during login on the authorization server should be the mobile device's system browser, not the app's internal HTTP client, nor the one used by web views. But, as explained in the answer, what you want to be authorized for upcoming REST requests is the app's internal HTTP client session on the BFF, not the system's browser one (for obvious security reasons, sessions are not shared between user agents). So, you need a deep link to intercept the redirection happening in the system browser to forward the code with the app's internal HTTP client (and its session): the BFF attaches tokens to the session of the agent that forwards the authorization code.
I already did it, so this is possible. Note that it requires handling cookies manually (a minimum of session and, if the BFF is shared with browser apps, CSRF). |
Beta Was this translation helpful? Give feedback.
@lukepopp, you should read the Stackoverflow answer more carefully.
Yes. Keep in mind that this URI containing the authorization code is provided as
Location
header in the response returned to the user-agent used during the login process on the authorization server.For several reasons (displaying forms, enabling SSO with other apps, ...), the user-agent used during login on the authorization server should be the mobile device's system browser, not the app's internal HTTP client, nor the one used by web views. But, as explained in the answer, …