You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
I'm calling google OAuth and everything works fine, except that the webview stays open afterwards and redirects the user to www.google.com.
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: