From c62c9bc497a0f83219679ef66688e3b63e241d5e Mon Sep 17 00:00:00 2001 From: Amanpal Singh <87360222+aman-alfresco@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:20:58 +0530 Subject: [PATCH] fixed infinite login issue (#74) --- .../java/com/alfresco/auth/ui/AuthenticationActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/auth/src/main/java/com/alfresco/auth/ui/AuthenticationActivity.kt b/auth/src/main/java/com/alfresco/auth/ui/AuthenticationActivity.kt index 4640b6b..c8282dc 100644 --- a/auth/src/main/java/com/alfresco/auth/ui/AuthenticationActivity.kt +++ b/auth/src/main/java/com/alfresco/auth/ui/AuthenticationActivity.kt @@ -179,7 +179,11 @@ abstract class AuthenticationActivity : AppCompatAc } fun handleResult(data: com.auth0.android.result.Credentials?, oauth2: OAuth2Data) { - data?.let { viewModel.pkceAuth.handleActivityResult(it, oauth2) } + if (data == null){ + viewModel.onPkceAuthCancelled() + }else{ + viewModel.pkceAuth.handleActivityResult(data, oauth2) + } } /**