1212using DCL . Profiles ;
1313using DCL . Profiles . Self ;
1414using DCL . SceneLoadingScreens . SplashScreen ;
15- using DCL . Settings . Utils ;
1615using DCL . UI ;
1716using DCL . Utilities ;
1817using DCL . Utility ;
1918using DCL . Web3 . Authenticators ;
2019using DCL . Web3 . Identities ;
2120using DCL . WebRequests ;
22- using Global . AppArgs ;
2321using MVC ;
2422using System ;
25- using System . Collections . Generic ;
2623using System . Threading ;
27- using UnityEngine ;
2824using Utility ;
2925
3026namespace DCL . AuthenticationScreenFlow
@@ -49,6 +45,7 @@ public enum AuthStatus
4945
5046 internal const int ANIMATION_DELAY = 300 ;
5147 internal const string LOADING_TRANSACTION_NAME = "loading_process" ;
48+ private const string EPIC_STORE_INSTALL_SOURCE = "epic" ;
5249
5350 private readonly ICompositeWeb3Provider web3Authenticator ;
5451 private readonly ISelfProfile selfProfile ;
@@ -150,9 +147,13 @@ protected override void OnViewInstantiated()
150147 base . OnViewInstantiated ( ) ;
151148
152149 audio = new AuthenticationScreenAudio ( viewInstance , audioMixerVolumesController , backgroundMusic ) ;
153- characterPreviewController = new AuthenticationScreenCharacterPreviewController ( viewInstance . CharacterPreviewView , emotesSettings , characterPreviewFactory , world , characterPreviewEventBus ) ;
150+ characterPreviewController = new AuthenticationScreenCharacterPreviewController ( viewInstance ! . CharacterPreviewView , emotesSettings , characterPreviewFactory , world , characterPreviewEventBus ) ;
154151
155- bool enableEmailOTP = FeaturesRegistry . Instance . IsEnabled ( FeatureId . EmailOTPAuth ) ;
152+ bool isEpicBuild = installSource == EPIC_STORE_INSTALL_SOURCE ;
153+ // Epic builds only support emailOTP due to deeplink limitations
154+ // See: https://github.com/decentraland/unity-explorer/issues/9554
155+ bool enableEmailOTP = FeaturesRegistry . Instance . IsEnabled ( FeatureId . EmailOTPAuth ) || isEpicBuild ;
156+ bool otherLoginMethodsEnabled = ! isEpicBuild ;
156157 viewInstance . LoginSelectionAuthView . EmailOTPContainer . SetActive ( enableEmailOTP ) ;
157158
158159 viewInstance . DiscordButton . onClick . AddListener ( OpenSupportUrl ) ;
@@ -163,7 +164,8 @@ protected override void OnViewInstantiated()
163164
164165 fsm . AddStates (
165166 new InitAuthState ( viewInstance , installSource ) ,
166- new LoginSelectionAuthState ( fsm , viewInstance , this , CurrentState , splashScreen , web3Authenticator , webBrowser , enableEmailOTP ) ,
167+ new LoginSelectionAuthState ( fsm , viewInstance , this , CurrentState , splashScreen , web3Authenticator , webBrowser ,
168+ enableEmailOTP , otherLoginMethodsEnabled ) ,
167169 new ProfileFetchingAuthState ( fsm , viewInstance , this , CurrentState , selfProfile , storedIdentityProvider ) ,
168170 new IdentityVerificationDappDeepLinkAuthState ( fsm , viewInstance , this , CurrentState , web3Authenticator ) ,
169171 new LobbyForExistingAccountAuthState ( fsm , viewInstance , this , splashScreen , CurrentState , characterPreviewController ) ,
0 commit comments