openid / AppAuth-Android

Android client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-Android
Apache License 2.0
2.83k stars 883 forks source link

User cancelled flow #1038

Open jinpengnice opened 8 months ago

jinpengnice commented 8 months ago

Authorize custom tags by opening them in the upper right corner of the browser for authorization. Upon returning to the app, a prompt appears: AuthorizationException: {"type": 0, "code": 1, "errorDescription": "User cancelled flow"}. However, I did not cancel the authorization and simply replaced the custom tag with a browser. Opening the browser does not result in the correct result

anhquan291 commented 7 months ago

Hi I'm facing the issue that there is no callback after cancelling the browser. Have you found the way yet @jinpengnice ? Really appreciated if anyone can help with this. Thanks a lot

sanlee888 commented 5 months ago

Steps to reproduce it:

  1. Calling AuthorizationService.performAuthorizationRequest(authRequestBuilder.build(), completeIntent, cancelIntent)
  2. In the new version of CustomTab, there is a new "minimize" icon right next to the "X" icon. That is for the picture-in-picture mode. Click on that "minimize" icon, so now the customTab is in PIP mode.
  3. Our app receives "cancelIntent" with AuthorizationExeception.
  4. Restore CustomTab from PIP mode to normal mode.
  5. User continue the login flow, but app won't receive "completeIntent".