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
53 stars 54 forks source link

Allow to configure window `open` on web #40

Closed Sese-Schneider closed 1 year ago

Sese-Schneider commented 1 year ago

Is your feature request related to a problem? Please describe.

When using flutter_web_auth_2 on web, it is not possible to configure how the auth window will open.

Describe the solution you'd like

I would like to configure the window.open call based on a custom configuration. For example I would like to use a popup instead of a new window.

Describe alternatives you've considered

Currently there are no configuration options. A custom implementation on a fork is the only possible option.

Additional context

This part https://github.com/ThexXTURBOXx/flutter_web_auth_2/blob/a0a870280a8b37a25bbcc8bc2ca1231815ca2d49/flutter_web_auth_2/lib/src/flutter_web_auth_2_web.dart#L49 should be more configurable, so that e.g.

context.callMethod('open', [url, "popup", "popup=true"]);

can be achieved.

ThexXTURBOXx commented 1 year ago

Thanks for the suggestion! This seems like a quick enhancement that I should be able to add very soon :)