-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Android, call to authenticate immediately returns CANCELED #8
Comments
Thanks for reporting this issue. I have taken a look at your fork and noticed that you have removed the observer lines. Did that help by any chance? |
Thanks for your reply. I've been doing some more testing today. Removing the observer lines did not solve the issue. I have observed the issue on both of my Android devices (OnePlus 9 and Google Pixel XL). I'm a little puzzled as to why this only happens for me in release mode 🤔. I'm wondering if it could be an issue with CustomTabs. |
It also puzzles me that it does not work after removing those lines. That is really weird. I would not expect this to be an issue with Custom Tabs, however, you cannot be sure. |
I finally found my issue. It was a stupid mistake on my part 🤦 . I had an intent filter for deep links that was intercepting the authenticate URL and not letting CustomTabs open. Thank you for the support. |
Okay, good to know for the future! Thank you very much for letting me know the solution! :) |
how to fix? |
Look through all your intent filters (and all the ones from the package you are depending on - they might also be the cause of the problem) and remove the ones which interfere with |
your redirect_url is https scheme or custom url? can you show me the AndroidMainfest.xml and you redirect_url? |
What if I want to set up both deep linking (so the user can click a link from somewhere else and it opens my app) and the callback URL? Based on this solution it feels like I can't do both because my deep link will just be intercepting my callback URL? |
Describe the bug
When I make the call to
FlutterWebAuth2.authenticate
, the web view does not open, and it immediately returnsPlatformException(CANCELED, User canceled login, null, null)
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
When
FlutterWebAuth2.authenticate
is called, a web view should open to the given url.Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information!)
flutter_web_auth_2
version: 1.1.2Additional context
I can only reproduce this issue once our android app is built in release mode and distributed through the Play store. I cannot reproduce it when building locally with Android Studio in either debug or release mode. It also can not reproduce this issue in our iOS app (same flutter code).
The text was updated successfully, but these errors were encountered: