From d054578503814107752e57526aef15f36fdd8712 Mon Sep 17 00:00:00 2001 From: Nicolas Lorusso Date: Fri, 31 Jul 2026 20:18:16 -0300 Subject: [PATCH 1/2] allow emailOTP only for epic store --- .../Assets/Prefabs/LoginSelection.Screen.prefab | 2 ++ .../AuthenticationScreenController.cs | 16 +++++++++------- .../States/LoginSelectionAuthState.cs | 8 ++++++-- .../Views/LoginSelectionAuthView.cs | 12 ++++++++++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Prefabs/LoginSelection.Screen.prefab b/Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Prefabs/LoginSelection.Screen.prefab index cfc099f350a..dcd983c51a1 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Prefabs/LoginSelection.Screen.prefab +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Prefabs/LoginSelection.Screen.prefab @@ -3216,6 +3216,8 @@ MonoBehaviour: k__BackingField: {fileID: 9108319191272288200} k__BackingField: {fileID: 5285033395635913484} k__BackingField: {fileID: 2001940849056367380} + k__BackingField: {fileID: 5887702060069110797} + k__BackingField: {fileID: 3844889584895123327} k__BackingField: {fileID: 4481630630708771614} k__BackingField: {fileID: 9078712830092277137} k__BackingField: {fileID: 8034867738283704265} diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs index 9df75ce865b..227406eb0ca 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs @@ -12,19 +12,15 @@ using DCL.Profiles; using DCL.Profiles.Self; using DCL.SceneLoadingScreens.SplashScreen; -using DCL.Settings.Utils; using DCL.UI; using DCL.Utilities; using DCL.Utility; using DCL.Web3.Authenticators; using DCL.Web3.Identities; using DCL.WebRequests; -using Global.AppArgs; using MVC; using System; -using System.Collections.Generic; using System.Threading; -using UnityEngine; using Utility; namespace DCL.AuthenticationScreenFlow @@ -49,6 +45,7 @@ public enum AuthStatus internal const int ANIMATION_DELAY = 300; internal const string LOADING_TRANSACTION_NAME = "loading_process"; + private const string EPIC_STORE_INSTALL_SOURCE = "epic"; private readonly ICompositeWeb3Provider web3Authenticator; private readonly ISelfProfile selfProfile; @@ -150,9 +147,13 @@ protected override void OnViewInstantiated() base.OnViewInstantiated(); audio = new AuthenticationScreenAudio(viewInstance, audioMixerVolumesController, backgroundMusic); - characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance.CharacterPreviewView, emotesSettings, characterPreviewFactory, world, characterPreviewEventBus); + characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance!.CharacterPreviewView, emotesSettings, characterPreviewFactory, world, characterPreviewEventBus); - bool enableEmailOTP = FeaturesRegistry.Instance.IsEnabled(FeatureId.EmailOTPAuth); + bool isEpicBuild = installSource == EPIC_STORE_INSTALL_SOURCE; + // Epic builds only support emailOTP due to deeplink limitations + // See: https://github.com/decentraland/unity-explorer/issues/9554 + bool enableEmailOTP = FeaturesRegistry.Instance.IsEnabled(FeatureId.EmailOTPAuth) || isEpicBuild; + bool otherLoginMethodsEnabled = !isEpicBuild; viewInstance.LoginSelectionAuthView.EmailOTPContainer.SetActive(enableEmailOTP); viewInstance.DiscordButton.onClick.AddListener(OpenSupportUrl); @@ -163,7 +164,8 @@ protected override void OnViewInstantiated() fsm.AddStates( new InitAuthState(viewInstance, installSource), - new LoginSelectionAuthState(fsm, viewInstance, this, CurrentState, splashScreen, web3Authenticator, webBrowser, enableEmailOTP), + new LoginSelectionAuthState(fsm, viewInstance, this, CurrentState, splashScreen, web3Authenticator, webBrowser, + enableEmailOTP, otherLoginMethodsEnabled), new ProfileFetchingAuthState(fsm, viewInstance, this, CurrentState, selfProfile, storedIdentityProvider), new IdentityVerificationDappDeepLinkAuthState(fsm, viewInstance, this, CurrentState, web3Authenticator), new LobbyForExistingAccountAuthState(fsm, viewInstance, this, splashScreen, CurrentState, characterPreviewController), diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs index 186a7f71f29..20518cb252a 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs @@ -24,11 +24,14 @@ public class LoginSelectionAuthState : AuthStateBase, IState, IPayloadedState machine, AuthenticationScreenView viewInstance, AuthenticationScreenController controller, ReactiveProperty currentState, SplashScreen splashScreen, - ICompositeWeb3Provider compositeWeb3Provider, UnityAppWebBrowser webBrowser, bool enableEmailOTP) : base(viewInstance) + ICompositeWeb3Provider compositeWeb3Provider, UnityAppWebBrowser webBrowser, + bool enableEmailOTP, + bool otherLoginMethodsEnabled) : base(viewInstance) { view = viewInstance.LoginSelectionAuthView; @@ -39,6 +42,7 @@ public LoginSelectionAuthState(MVCStateMachine machine, this.compositeWeb3Provider = compositeWeb3Provider; this.webBrowser = webBrowser; this.enableEmailOTP = enableEmailOTP; + this.otherLoginMethodsEnabled = otherLoginMethodsEnabled; // Cancel button persists in the Verification state (until code is shown) view.CancelLoginButton.onClick.AddListener(OnCancelBeforeVerification); @@ -136,7 +140,7 @@ public void Enter(int animHash) if (splashScreen != null) // it can be destroyed after first login splashScreen.FadeOutAndHide(); - view.Show(animHash, moreOptionsExpanded: !enableEmailOTP); + view.Show(animHash, moreOptionsExpanded: !enableEmailOTP, otherLoginMethodsEnabled); Enter(); } diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs index dd8d862cf7c..e26ae21ebf3 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs @@ -23,6 +23,12 @@ public class LoginSelectionAuthView : ViewBase public EmailInputFieldView EmailInputField { get; private set; } = null!; [field: Header("SECONDARY LOGINS")] + [field: SerializeField] + public GameObject OtherLoginContainer { get; private set; } = null!; + + [field: SerializeField] + public GameObject ContinueWithTextContainer { get; private set; } = null!; + [field: SerializeField] public Button LoginMetamaskButton { get; private set; } = null!; @@ -103,13 +109,15 @@ private void SetOptionsPanelVisibility(bool isExpanded) moreOptionsPanel.SetActive(isExpanded); } - public void Show(int animHash, bool moreOptionsExpanded) + public void Show(int animHash, bool moreOptionsExpanded, bool otherLoginMethodsEnabled) { showAnimHash = animHash; ShowAsync(CancellationToken.None).Forget(); areOptionsExpanded = moreOptionsExpanded; - SetOptionsPanelVisibility(areOptionsExpanded); + OtherLoginContainer.SetActive(otherLoginMethodsEnabled); + ContinueWithTextContainer.SetActive(otherLoginMethodsEnabled && !moreOptionsExpanded); + SetOptionsPanelVisibility(areOptionsExpanded && otherLoginMethodsEnabled); SetLoadingSpinnerVisibility(false); } From 8582a7647d0d0db8ddc046fc9ca35da975b502cd Mon Sep 17 00:00:00 2001 From: Nicolas Lorusso Date: Fri, 31 Jul 2026 20:35:42 -0300 Subject: [PATCH 2/2] ignore case --- .../AuthenticationScreenFlow/AuthenticationScreenController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs index 227406eb0ca..e3364138eb7 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs @@ -149,7 +149,7 @@ protected override void OnViewInstantiated() audio = new AuthenticationScreenAudio(viewInstance, audioMixerVolumesController, backgroundMusic); characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance!.CharacterPreviewView, emotesSettings, characterPreviewFactory, world, characterPreviewEventBus); - bool isEpicBuild = installSource == EPIC_STORE_INSTALL_SOURCE; + bool isEpicBuild = string.Equals(installSource, EPIC_STORE_INSTALL_SOURCE, StringComparison.OrdinalIgnoreCase); // Epic builds only support emailOTP due to deeplink limitations // See: https://github.com/decentraland/unity-explorer/issues/9554 bool enableEmailOTP = FeaturesRegistry.Instance.IsEnabled(FeatureId.EmailOTPAuth) || isEpicBuild;