SAP-samples / appgyver-auth-flows

SAP Cloud Identity and XSUAA authentication samples for SAP AppGyver. This repository shows how to apply OAuth 2.0 authorization and token flows to your SAP AppGyver apps.
https://blogs.sap.com/2022/03/22/sap-appgyver-and-proof-key-for-code-exchange-pkce-or-striving-for-enterprise-grade-security-in-sap-low-code-applications/
Apache License 2.0
13 stars 2 forks source link

Issue with auth flow on Android #3

Open uxkjaer opened 1 year ago

uxkjaer commented 1 year ago

I’m building an app where I’m implementing an oauth flow via PKCE for BTP UAA. I’m using the webview to open the initial login page and then the onLocationChange event to check when I receive the code back after a successful login. This works fine on iOS. But on Android (Samsung S22) it hangs for a very long time and eventually fire. I initially thought it was an endless loop, but that doesn’t seem to be the case. I tried to use google and then after a delay to route to bing. This works fine. So for some reason it stops firing the event on android.

Any ideas?

jmsrpp commented 1 year ago

Hi @uxkjaer, thanks for raising an issue in our repo. I don't know offhand what could be causing this issue with Android, but would suggest utilizing the debugger or outputting the values of the JS to your console log. We will need to triage which step in the process is breaking down to pinpoint the problem.