ThexXTURBOXx / flutter_web_auth_2

Flutter plugin for authenticating a user with a web service
https://pub.dev/packages/flutter_web_auth_2
MIT License
51 stars 50 forks source link

Windows: Missing Plugin Implementation #7

Closed 2002Bishwajeet closed 2 years ago

2002Bishwajeet commented 2 years ago

Describe the bug

When I authenticate to my custom backend in the windows app, I get this error! Error: MissingPluginException(No implementation found for method authenticate on channel flutter_web_auth_2)

I believed in pub.dev/flutter_web_auth_2 , it shows the support for windows as well

To Reproduce

Steps to reproduce the behavior:

  1. You can run the example given in the package itself

Expected behavior

It should work

Device (please complete the following information!)

Additional context

Maybe I am missing some documentation here or somethings not working internally.

ThexXTURBOXx commented 2 years ago

That's weird. I thought I had tested this... I will test again and fix as soon as possible!

2002Bishwajeet commented 2 years ago

Thanks for the quick response😄

ThexXTURBOXx commented 2 years ago

I have fixed this issue and am trying to publish the new version right now. However, there are some difficulties with publishing for some reason. I will see what I can do!

ThexXTURBOXx commented 2 years ago

New version successfully published! Something in my dart caches was broken...

2002Bishwajeet commented 2 years ago

Quick question: If I update to the latest version, wouldn't I face dependency conflicts with win32? Cause as mentioned before device_info_plus still depends on 2.7.0 on win32 and this package supports 3.0.0

ThexXTURBOXx commented 2 years ago

Yes, someone has to push the plus_plugins community to update to win32. Maybe I can even do it, let's see

2002Bishwajeet commented 2 years ago

I found a hack for now. use dependencies overrides https://dart.dev/tools/pub/dependencies#dependency-overrides

dependency_overrides:
  win32: '2.7.0'
2002Bishwajeet commented 2 years ago

Hey @ThexXTURBOXx , I do have one question. Why does callbackurl scheme must start with https://localhost:port for windows implementation??

ThexXTURBOXx commented 2 years ago

That is just a limitation that is needed for now. If you are able to achieve a working Windows implementation any other way, please let me know (or even better) open a PR :)

ThexXTURBOXx commented 2 years ago

@2002Bishwajeet I have loosened the constraint on win32. You can now get rid of the dependency_override. However, package upgrades in path_provider and two plus_plugins are already on their way.