File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class AuthRepository {
5353 },
5454 );
5555
56- final launched = await launchUrl (authUrl, mode: .externalApplication );
56+ final launched = await launchUrl (authUrl, mode: .inAppBrowserView );
5757 if (! launched) {
5858 throw Exception ('Could not open browser for authentication.' );
5959 }
@@ -64,6 +64,11 @@ class AuthRepository {
6464 .first
6565 .timeout (const Duration (minutes: 5 ));
6666
67+ // Dismiss the in-app browser (SFSafariViewController on iOS).
68+ // On Android, Chrome Custom Tabs close automatically when the intent is
69+ // intercepted; this call is a no-op in that case.
70+ await closeInAppWebView ();
71+
6772 final returnedState = callbackUri.queryParameters['state' ];
6873 if (returnedState != state) {
6974 throw Exception ('OAuth state mismatch.' );
You can’t perform that action at this time.
0 commit comments