flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

[IOS] Would it be possible to support non-embedded browser (so use the default system browser)

Open MathiasCochet opened this issue 1 year ago • 4 comments

I have been using a fork* of this library that adds the use of a default browser to authenticate. I had to use this becasue the way my authentication works is as follows:

  • user clicks on login button -> default browser opens (not in-app) -> browser opens authentication app (itsme) -> app opens callback url back in the browser -> browser closes and goes back to app.

This used to work just fine until iOS 18. If I click the login button I just get "error: unable to open Safari."

So I tried using the latest version of flutter_appauth. But then the flow breaks. it looks something like this.

  • user clicks on login button -> in-app browser opens -> inapp browser opens authentication app (itsme) -> app opens callback url in default browser (so it doesnt return to the app with the in-app browser open) -> callback show an error.

*the fork: https://github.com/digitalrmdy/flutter_appauth/tree/feature/android-sdk-34

MathiasCochet avatar Nov 08 '24 13:11 MathiasCochet

This would be something you'd need to investigate to determine. The plugin makes use of the AppAuth Android and iOS SDKs so the functionality is really provided by those SDKs

MaikuB avatar Nov 13 '24 08:11 MaikuB

We have the same issue with our app > browser > auth app > browser > app flow. We would really like non-embedded browser support.

flora-gr avatar Mar 24 '25 14:03 flora-gr

There was an attempt at solving this in https://github.com/MaikuB/flutter_appauth/pull/318 I'm currently rebasing these changes onto latest ExternalUserAgent feature. Extending the enum should be straightforward...

CaringDev avatar May 13 '25 13:05 CaringDev

[...] #318 [...] rebasing these changes onto latest ExternalUserAgent feature. Extending the enum should be straightforward...

Turns out it is very straightforward 😀

CaringDev avatar May 13 '25 14:05 CaringDev