Skip to content

Commit 705c046

Browse files
committed
Fixes typecasting issues and revert fixes for CI tests failure
1 parent 1281584 commit 705c046

13 files changed

Lines changed: 14 additions & 38 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
env:
1616
ruby: '3.3.1'
1717
flutter: '3.x'
18-
ios-simulator: iPhone 17
18+
ios-simulator: iPhone 16
1919
java: 17
2020

2121
jobs:

auth0_flutter/android/src/main/kotlin/com/auth0/auth0_flutter/Auth0FlutterPlugin.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@ class Auth0FlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware {
187187
}
188188

189189
override fun onDetachedFromActivityForConfigChanges() {
190-
webAuthCallHandler.activity = null
191-
credentialsManagerCallHandler.activity = null
192190
WebAuthProvider.removeCallback(processDeathCallback)
193191
}
194192

@@ -199,8 +197,6 @@ class Auth0FlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware {
199197
}
200198

201199
override fun onDetachedFromActivity() {
202-
webAuthCallHandler.activity = null
203-
credentialsManagerCallHandler.activity = null
204200
WebAuthProvider.removeCallback(processDeathCallback)
205201
}
206202
}

auth0_flutter/android/src/main/kotlin/com/auth0/auth0_flutter/Auth0FlutterWebAuthMethodCallHandler.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
99
import io.flutter.plugin.common.MethodChannel.Result
1010

1111
class Auth0FlutterWebAuthMethodCallHandler(private val requestHandlers: List<WebAuthRequestHandler>) : MethodCallHandler {
12-
// Null while the plugin is detached from an Activity (see ActivityAware
13-
// callbacks in Auth0FlutterPlugin).
14-
var activity: Activity? = null
12+
lateinit var activity: Activity
1513

1614
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
1715
val requestHandler = requestHandlers.find { it.method == call.method }
1816

1917
if (requestHandler != null) {
2018
val request = MethodCallRequest.fromCall(call)
2119

22-
requestHandler.handle(activity!!, request, result)
20+
requestHandler.handle(activity, request, result)
2321
} else {
2422
result.notImplemented()
2523
}

auth0_flutter/android/src/main/kotlin/com/auth0/auth0_flutter/request_handlers/api/PasskeyCredentialExchangeApiRequestHandler.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class PasskeyCredentialExchangeApiRequestHandler : ApiRequestHandler {
3636

3737
assertHasProperties(listOf("challenge.authSession", "credential"), args)
3838

39-
val authSession = (args["challenge"] as Map<*, *>)["authSession"] as String
39+
val challenge = args["challenge"] as Map<*, *>
40+
val authSession = challenge["authSession"] as String
4041
val credentialMap = args["credential"] as Map<*, *>
4142

4243
val connection = args["connection"] as? String

auth0_flutter/android/src/main/kotlin/com/auth0/auth0_flutter/request_handlers/api/PasskeySignupChallengeApiRequestHandler.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class PasskeySignupChallengeApiRequestHandler : ApiRequestHandler {
2424
val connection = args["connection"] as? String
2525
val organization = args["organization"] as? String
2626

27-
@Suppress("UNCHECKED_CAST")
28-
val userMetadata = args["userMetadata"] as? Map<String, String>
27+
val userMetadata = (args["userMetadata"] as? Map<*, *>)
28+
?.mapKeys { it.key.toString() }
29+
?.mapValues { it.value.toString() }
2930
val userData = UserData(
3031
email = args["email"] as? String,
3132
phoneNumber = args["phoneNumber"] as? String,

auth0_flutter/darwin/.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ build/
1212
GeneratedPluginRegistrant.h
1313
GeneratedPluginRegistrant.m
1414

15-
# Swift Package Manager build cache
16-
.build/
17-
.swiftpm/
18-
1915
.generated/
2016

2117
*.pbxuser

auth0_flutter/example/android/gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ org.gradle.jvmargs=-Xmx1536M \
77
android.useAndroidX=true
88
android.enableJetifier=true
99
android.jetifier.ignorelist=bcprov-jdk15on
10-
# This builtInKotlin flag was added automatically by Flutter migrator
11-
android.builtInKotlin=false
12-
# This newDsl flag was added automatically by Flutter migrator
13-
android.newDsl=false

auth0_flutter/example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.6.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
21+
id "com.android.application" version "8.3.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
2323
}
2424

2525
include ':app'

auth0_flutter/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@
11161116
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
11171117
CLANG_ENABLE_MODULES = YES;
11181118
CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
1119-
CODE_SIGN_STYLE = Manual;
1119+
CODE_SIGN_STYLE = Automatic;
11201120
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
11211121
DEVELOPMENT_TEAM = "";
11221122
ENABLE_BITCODE = NO;

auth0_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = ""
2828
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
29-
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
3029
shouldUseLaunchSchemeArgsEnv = "NO"
3130
codeCoverageEnabled = "YES">
3231
<MacroExpansion>
@@ -77,13 +76,11 @@
7776
buildConfiguration = "Debug"
7877
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7978
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
80-
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
8179
launchStyle = "0"
8280
useCustomWorkingDirectory = "NO"
8381
ignoresPersistentStateOnLaunch = "NO"
8482
debugDocumentVersioning = "YES"
8583
debugServiceExtension = "internal"
86-
enableGPUValidationMode = "1"
8784
allowLocationSimulation = "YES">
8885
<BuildableProductRunnable
8986
runnableDebuggingMode = "0">

0 commit comments

Comments
 (0)