From 653b32456ab69ab323979a0ed70f0e02b280f3a9 Mon Sep 17 00:00:00 2001 From: Jamil Date: Tue, 9 Jan 2024 20:41:04 -0800 Subject: [PATCH] fix(android): handle_sign_in_callback is the host part of the URI (#3149) Gets the new auth flow working for Android --- .../android/features/customuri/ui/CustomUriViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlin/android/app/src/main/java/dev/firezone/android/features/customuri/ui/CustomUriViewModel.kt b/kotlin/android/app/src/main/java/dev/firezone/android/features/customuri/ui/CustomUriViewModel.kt index 42a58a6b8..3647af4f2 100644 --- a/kotlin/android/app/src/main/java/dev/firezone/android/features/customuri/ui/CustomUriViewModel.kt +++ b/kotlin/android/app/src/main/java/dev/firezone/android/features/customuri/ui/CustomUriViewModel.kt @@ -26,10 +26,10 @@ internal class CustomUriViewModel val actionLiveData: LiveData = actionMutableLiveData fun parseCustomUri(intent: Intent) { - Log.d("CustomUriViewModel", "Parsing app link...") + Log.d("CustomUriViewModel", "Parsing callback...") viewModelScope.launch { Log.d("CustomUriViewModel", "viewmodelScope.launch") - when (intent.data?.lastPathSegment) { + when (intent.data?.host) { PATH_CALLBACK -> { Log.d("CustomUriViewModel", "PATH_CALLBACK") intent.data?.getQueryParameter(QUERY_CLIENT_STATE)?.let { state ->