teranetsrl / oauth2_client

Simple Dart library for interacting with OAuth2 servers.
BSD 2-Clause "Simplified" License
96 stars 112 forks source link

Single Sign On(SSO) is not working #161

Closed durga-nannamsetty closed 1 year ago

durga-nannamsetty commented 1 year ago

We are developing a Flutter app and need to integrate OAuth2. We also have existing web app that is OAuth2 enabled, and the user can open the web links from our (new) Flutter app.

We have decided to use “oauth2_client” to implement the authentication part mainly to support SSO between the flutter app + the web app that we open inside the mobile app in few screens. And we are using “url_launcher” package to open the web app links.

We can login inside the app using oauth2_client. (Thank you for this amazing package)

However, when I login to the mobile app, and try to open the web app link using “url_launcher” package the web app prompts for the login credentials. But our expectation is that it should not prompt for login again because user already logged in for the same OAuth2 configuration.

I would like to get some understanding on this problem.

P.S Edited:-

I could able to resolve this in android by using

  1. webAuthOpts: {'preferEphemeral': false}, in "oauth2_client" and
  2. Using ChromeSafariBrowser from "flutter_inappwebview" package.

But the issues remains same in iOS.

durga-nannamsetty commented 1 year ago

I am closing this ticket. Because I realised that this is more related to In-App browser and Apple restrictions.