From 07832e7f7066f6207ce155a4c7947ac431ae0f64 Mon Sep 17 00:00:00 2001 From: AndroidBob Date: Tue, 12 Mar 2024 21:00:46 +0100 Subject: [PATCH] fix: Remove autologin in Keycloak in E2EI [WPB-7061] (#2777) Co-authored-by: boris Co-authored-by: Oussama Hassine --- .../main/kotlin/com/wire/android/feature/e2ei/OAuthUseCase.kt | 1 + .../android/ui/e2eiEnrollment/GetE2EICertificateViewModel.kt | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/feature/e2ei/OAuthUseCase.kt b/app/src/main/kotlin/com/wire/android/feature/e2ei/OAuthUseCase.kt index 14e509fb0af..b3b96844731 100644 --- a/app/src/main/kotlin/com/wire/android/feature/e2ei/OAuthUseCase.kt +++ b/app/src/main/kotlin/com/wire/android/feature/e2ei/OAuthUseCase.kt @@ -166,6 +166,7 @@ class OAuthUseCase( AuthorizationRequest.Scope.PROFILE, AuthorizationRequest.Scope.OFFLINE_ACCESS ).setClaims(JSONObject(claims.toString())) + .setPrompt(AuthorizationRequest.Prompt.LOGIN) .build() private fun AuthorizationRequest.Builder.setCodeVerifier(): AuthorizationRequest.Builder { diff --git a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateViewModel.kt index c179dd2856d..dda01115c8e 100644 --- a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateViewModel.kt @@ -68,8 +68,7 @@ class GetE2EICertificateViewModel @Inject constructor( .fold({ enrollmentResultFlow.emit(Either.Left(it)) }, { - if (it is E2EIEnrollmentResult.Initialized) requestOAuthFlow.emit(it) - else enrollmentResultFlow.emit(Either.Right(it)) + requestOAuthFlow.emit(it) }) } }