From e7ec53dd76c647467940ac41f14c0bb5d06d6fbf Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 16 Oct 2024 14:42:30 +0200 Subject: [PATCH] Use Create prompt when user already said they wanted to create an account #3627. --- .../confirmaccountprovider/ConfirmAccountProviderPresenter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt index 63720a613b..6cc4cdc5e4 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt @@ -93,7 +93,8 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( val matrixHomeServerDetails = authenticationService.getHomeserverDetails().value!! if (matrixHomeServerDetails.supportsOidcLogin) { // Retrieve the details right now - LoginFlow.OidcFlow(authenticationService.getOidcUrl(OidcPrompt.Consent).getOrThrow()) + val oidcPrompt = if (params.isAccountCreation) OidcPrompt.Create else OidcPrompt.Consent + LoginFlow.OidcFlow(authenticationService.getOidcUrl(oidcPrompt).getOrThrow()) } else if (params.isAccountCreation) { val url = webClientUrlForAuthenticationRetriever.retrieve(homeserverUrl) LoginFlow.AccountCreationFlow(url)