-
Notifications
You must be signed in to change notification settings - Fork 115
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
🐛 Bug Report: Flutter Web authentication bad URLCallback - doesn't work #114
Comments
@lohanidamodar would you be able to help with this? |
I'm pretty sure this was working before, but the upgrade of flutter_web_auth_2 to 2.x probably broke it. |
@netapy I'll look into it. |
I have similar issue #116 Have you found any solutions yet? |
@hemangjoshi37a , for now I just use a forked version of flutter_web_auth_2 I made : https://github.com/netapy/flutter_web_auth_2_oauthlinkfix , just link to this repository instead of the dependency, if you can’t wait for the fix. |
@netapy @hemangjoshi37a the fix is already merged and should be released soon |
Thanks for handling it. |
@netapy version 8.2.1 should resolve this issue |
👟 Reproduction steps
My app uses flutter (web, Android, iOS) for the front-end and Appwrite for the back end.
I use OAuth to let my users log in.
There is a bug with the
flutter_web_auth_2 2.0.3
dependency that Appwrite uses.To log in to my service, this function is called in my client :
But the success and failure callbackUrls give an error because of this check in
flutter_web_auth_2 2.0.3
:https://github.com/ThexXTURBOXx/flutter_web_auth_2/blob/157285f9230cfc1815ed5b2bb6a58b1dabc277d5/flutter_web_auth_2/lib/flutter_web_auth_2.dart#L35-L44
Which verifies if the url scheme corresponds to
r'^[a-z][a-z0-9+.-]*$'
.It doesn't, because it's a URL with
https://
... so not only alphanumerical characters with.
and-
.Removing the
https://
raises an error in Appwrite saying the callback url is wrong.👍 Expected behavior
It should not raise an exception for the success and failure url scheme.
👎 Actual Behavior
It raises an exception.
🎲 Appwrite version
Version 1.2.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: