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

Platform dosnt init to Web when deployed to AWS #82

Closed TheRealNOIG closed 10 months ago

TheRealNOIG commented 10 months ago

Describe the bug

Package dosnt initialize properly when deployed to AWS Static site. When running localy on Web there are no issue but when deployed to AWS I receive this error

MissingPluginException(No implementation found for method authenticate on channel flutter_web_auth_2)

I resolved this issue by changing the default from windows to web but this probably isnt a good long term solutions

https://github.com/TheRealNOIG/flutter_web_auth_2/commit/633e2068c244347d641afd63216f9ca224e9012d

To Reproduce

Steps to reproduce the behavior:

  1. Build Flutter App to web
  2. upload to AWS Static Site (I use SST for this)
  3. Have something call FlutterWebAuth2.authenticate
  4. Look at console for error MissingPluginException(No implementation found for method authenticate on channel flutter_web_auth_2)

Expected behavior

Open 3rd party auth site

Screenshots

If applicable, add screenshots to help explain your problem.

Device (please complete the following information!)

Additional context

Add any other context about the problem here.

Checklist

ThexXTURBOXx commented 10 months ago

I hope that this is now fixed in 3.0.3. Could you please try and report back? Conditional exporting seems to not work very nicely in Flutter/Dart yet, so I am guessing that 31d59aca8e3b438fa9b8afb287e5baf6a1c6a4a7 should do the trick :)

TheRealNOIG commented 10 months ago

That resolved it. Thanks

ThexXTURBOXx commented 10 months ago

Perfect, thanks for reporting back!