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
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ class AuthenticationManagementActivity : ComponentActivity() {
35
35
privatevar authStarted:Boolean=false
36
36
privatelateinitvar authenticationUri:Uri
37
37
privatevar intentFlags:Int=0
38
-
privatelateinitvar targetPackage:String
38
+
privatevar targetPackage:String?=null
39
39
privatevar preferEphemeral:Boolean=false
40
40
privatelateinitvar callbackScheme:String
41
41
privatevar callbackHost:String?=null
@@ -107,14 +107,24 @@ class AuthenticationManagementActivity : ComponentActivity() {
107
107
val intent = intentBuilder.build()
108
108
109
109
intent.intent.addFlags(intentFlags)
110
-
intent.intent.setPackage(targetPackage)
110
+
if(targetPackage !=null){
111
+
intent.intent.setPackage(targetPackage)
112
+
}
111
113
112
-
if (callbackScheme =="https"&& callbackHost !=null&& callbackPath !=null) {
113
-
Log.d(LOG_TAG, "Using https host and path: $callbackHost, $callbackPath")
0 commit comments