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 callbackUrlScheme are invalid #22

Closed Knupper closed 1 year ago

Knupper commented 1 year ago

Describe the bug

When you run your example app, or any other implementation, it is not possible to give a valid callbackUrlScheme for windows, as windows needs a scheme that matchs RegEx() and you check the scheme before with RegEx, it is not possible to start a windows authentication.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'example/lib/main.dart'
  2. Run the app
  3. Click on 'Authenticate'
  4. See error

Expected behavior

It is possible to add a callbackUrlScheme for windows that matchs the RegEx from the plattform implementation.

Device (please complete the following information!)

Additional context

/flutter_web_auth_2/lib/flutter_web_auth_2.dart in line 62 and flutter_web_auth_2/lib/src/flutter_web_auth_2_windows.dart line 66 close each other.

Fix

23 for the fix