-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebView Browser stays open after successful call to FlutterWebAuth.authenticate #133
Comments
@LinusU This is happening to me too. What's weird is that it worked the very first time I tried it, then subsequently failed all other attempts. Edit : it seems according to https://bugs.chromium.org/p/chromium/issues/detail?id=545446 that it would suffice for the app to redirect to the main activity. |
Yo any solutions for this. the browser tab stays open after auth process. |
This is also happening for me. Workaround: I found that if you set preferEphemeral to true, the browser closes after auth. But it also causes the browser to close if the user leaves it at all, so it doesn't help my situation as I want users to have the option to copy a MFA code from a different app - but when they return the browser will be closed. Maybe preferEphemeral: true can help your case, but I would love the browser to close after auth whether it is true or false. |
FlutterWebAuth 0.4.1
AndroidManifest.xml:
<activity android:exported="true" android:name="com.linusu.flutter_web_auth.CallbackActivity" > <intent-filter android:label="flutter_web_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="your-focus" /> </intent-filter> </activity>
Flutter call:
final result = await FlutterWebAuth.authenticate(url: _authorizationEndpointUrl, callbackUrlScheme: 'your-focus'); String? code = Uri.parse(result).queryParameters['code']; print('MS365 Code: ' + (code ?? ""));
This prints the Code correctly, but the WebView Browser remains open.
The relevant section of the logcat:
I am connecting to the Microsoft OAUTH to get a token for Microsoft 365 Graph API.
Any thoughts on a fix or further debugging would be appreciated!
The text was updated successfully, but these errors were encountered: