simple_auth icon indicating copy to clipboard operation
simple_auth copied to clipboard

Chrome tabs remain open after redirect back to app

Open colonelpopcorn opened this issue 7 months ago • 0 comments

I inherited a cross platform application and this library works super well for Azure authentication! However, when I login on simulated Android devices I am redirected successfully back to the app but the chrome tabs still remain imposed over top of the app and I have to tap the X or hit back to return to the app. Is there some way to override this behavior? Here's my relevant activity section of my manifest.xml file, I've changed the scheme but I've confirmed it matches the package name for my app:

 <activity
      android:name="clancey.simpleauth.simpleauthflutter.SimpleAuthCallbackActivity"
      android:exported="true"
      android:taskAffinity="">
      <intent-filter android:label="simple_auth">
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="my.app.thatiscrossplatform"
              android:path="/redirect"/>
      </intent-filter>
  </activity>

I also tried this on actual Android hardware, but I get a different error. I follow the login flow for my organization and I get the following:

AADSTS90015: The required field 'request' is missing from the credential.
Ensure that you have all the necessary parameters for the login request.

On the simulator, I'm able to continue to the app with credentials by just closing it, but on hardware I close the chrome tab and I have no credentials. Any ideas?

colonelpopcorn avatar Jul 25 '24 20:07 colonelpopcorn