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
Copy file name to clipboardExpand all lines: flutter_web_auth_2/android/src/main/kotlin/com/linusu/flutter_web_auth_2/AuthenticationManagementActivity.kt
+16-19Lines changed: 16 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -86,12 +86,12 @@ class AuthenticationManagementActivity : ComponentActivity() {
86
86
87
87
if (!authStarted) {
88
88
89
-
val intentBuilder =if (shouldUseLegacySystem()) {
90
-
Log.d(LOG_TAG, "Using CustomTabsIntent")
91
-
CtBuilderWrapper(CustomTabsIntent.Builder())
92
-
} else {
89
+
val intentBuilder =if (shouldUseAuthTabs()) {
93
90
Log.d(LOG_TAG, "Using AuthTabIntent")
94
91
AuthTabBuilderWrapper(AuthTabIntent.Builder())
92
+
} else {
93
+
Log.d(LOG_TAG, "Using CustomTabsIntent")
94
+
CtBuilderWrapper(CustomTabsIntent.Builder())
95
95
}
96
96
97
97
// Set ephemeral browsing if requested and supported
@@ -107,11 +107,11 @@ class AuthenticationManagementActivity : ComponentActivity() {
107
107
val intent = intentBuilder.build()
108
108
109
109
intent.intent.addFlags(intentFlags)
110
-
if(targetPackage !=null){
110
+
if(targetPackage !=null){
111
111
intent.intent.setPackage(targetPackage)
112
112
}
113
113
114
-
try{
114
+
try{
115
115
if (callbackScheme =="https"&& callbackHost !=null&& callbackPath !=null) {
116
116
Log.d(LOG_TAG, "Using https host and path: $callbackHost, $callbackPath")
0 commit comments