flutter_web_auth_2 icon indicating copy to clipboard operation
flutter_web_auth_2 copied to clipboard

Add ASWebAuthenticationSession.Callback support

Open kay-schecker opened this issue 10 months ago • 2 comments

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

If I wanna use the https scheme and Universal Links on iOS the completionHandler is not called.

  • This is related to Issue #65

Describe the solution you'd like

Apple has deprecated the previous initializer matching in favor of the new initializer factory functions:

  • ASWebAuthenticationSession.Callback.customScheme(String)
  • ASWebAuthenticationSession.Callback.https(host: String, path: String)

kay-schecker avatar Apr 08 '24 23:04 kay-schecker

Sadly, my MacOS VM is not working properly anymore, so I cannot work on this issue without blindly replacing things. If you have access to Apple hardware (or a VM), feel free to contribute via PR! :)

ThexXTURBOXx avatar Apr 15 '24 13:04 ThexXTURBOXx

I finally had access to a Macbook of a friend of mine. At least I was able to add partial support for the new initializer. I tested it on a simulator for iOS and the macBook itself - both worked fine. However, I don't know if this breaks older environments, so it is good to have this published within the 4.x alpha cycle. For now, I have not added ASWebAuthenticationSession.Callback.https(host: String, path: String), but I may do that at some other point. Hence, I will keep this issue open for now.

ThexXTURBOXx avatar Jun 05 '24 20:06 ThexXTURBOXx

@ThexXTURBOXx +1 for this feature

wildsurfer avatar Aug 05 '24 09:08 wildsurfer

@wildsurfer Feel free to create a PR :)

ThexXTURBOXx avatar Aug 05 '24 09:08 ThexXTURBOXx