Skip to content

fix: allow emailOTP only for epic store - #9555

Merged
anicalbano merged 2 commits into
mainfrom
hotfix/epic-login
Aug 1, 2026
Merged

fix: allow emailOTP only for epic store#9555
anicalbano merged 2 commits into
mainfrom
hotfix/epic-login

Conversation

@lorux0

@lorux0 lorux0 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

What does this PR change?

Fixes #9554
Works as mitigation change, not final solution.

Test instructions

  1. Download epic store build
  2. Check that you only have one login option: emailOTP
  3. Go through the login and check is OK
  4. Download the normal build
  5. Check you have all of the login options enabled

Quality Checklist

  • Changes have been tested locally
  • Documentation has been updated (if required)
  • Performance impact has been considered
  • For SDK features: Test scene is included

Code Review Reference

Please review our Branch & PR Standards before submitting. It explains the automated review flow, QA/DEV approval requirements, and what each label does — especially useful for first-time contributors.

@lorux0
lorux0 requested review from a team as code owners July 31, 2026 23:20
@github-actions
github-actions Bot requested a review from DafGreco July 31, 2026 23:21
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@lorux0
lorux0 changed the base branch from dev to main July 31, 2026 23:21
@decentraland-bot
decentraland-bot self-requested a review July 31, 2026 23:21

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review — #9555 fix: allow emailOTP only for epic store

STEP 2 — Root-cause check

PASS. This is an acknowledged mitigation for #9554. Epic builds cannot receive decentraland:// deeplink callbacks, so wallet/social login is completely blocked. Hiding those options and forcing email OTP is a valid interim fix. The PR description explicitly states this is "not final solution" — acceptable.

STEP 3 — Design & integration

PASS. No new long-lived units introduced. The otherLoginMethodsEnabled flag flows through the existing controller → state → view pattern, which is the correct seam for this change. The installSource string is already injected into the controller; deriving isEpicBuild from it is the natural place. The LoginSelectionAuthState stores the flag and passes it to the view on Enter(int) — this correctly covers all entry points (Enter(int) called from Enter(ErrorType) and directly from the controller).

Owner search: N/A — no new lifecycle-managing units.

STEP 4 — Member audit

Member File Consumers Verdict
OtherLoginContainer LoginSelectionAuthView Show() (1) Serialized Unity reference — appropriate
ContinueWithTextContainer LoginSelectionAuthView Show() (1) Serialized Unity reference — appropriate
otherLoginMethodsEnabled LoginSelectionAuthState Enter(int)view.Show() (1) State-machine pass-through — appropriate
EPIC_STORE_INSTALL_SOURCE AuthenticationScreenController OnViewInstantiated() (1) Named constant — appropriate

STEP 5 — Line-level findings

See inline comments. Two P2 findings:

  1. P2 — Null-forgiving operator (!) on viewInstance without justifying comment
  2. P2ToggleOptionsPanelExpansion() bypasses the otherLoginMethodsEnabled guard on SetOptionsPanelVisibility

Security review

No security issues found. The change restricts available login methods (does not add new attack surface). The installSource comparison uses a build-time constant. No secrets, no injection vectors, no auth bypass.

STEP 6 — Complexity

COMPLEX — modifies login method availability in the authentication flow; touches 4 files including auth screen controller and state machine.

STEP 7 — QA assessment

QA_REQUIRED: YES — changes the login screen UI and available authentication methods for Epic builds. Needs manual verification on both Epic and non-Epic builds.

STEP 8 — Non-blocking warnings

None. Main scene not modified.

STEP 9 — Verdict

REVIEW_RESULT: PASS ✅
COMPLEXITY: COMPLEX
COMPLEXITY_REASON: Modifies login method availability in the authentication screen flow, gating UI and state by install source.
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by decentraland-bot via GitHub

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Jarvis reviewed this PR and found no blocking issues, but assessed it as complex — human DEV review is still required before merging.

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review

STEP 1 — Load context & set scope

Loaded CLAUDE.md, docs/README.md, docs/web3-authentication.md, docs/mvc.md, and docs/code-style-guidelines.md. Checked out PR #9555 locally and reviewed the changed auth UI/controller files plus related auth/provider wiring.

STEP 2 — Root-cause check

The immediate Epic blocker is that web3/social login depends on the decentraland:// callback, which Epic installs do not own. This PR mitigates the production blocker by exposing only Email OTP for Epic builds while leaving normal launcher builds unchanged. For that scoped mitigation, the diff addresses the immediate user-facing cause; the protocol-handler/web3 callback gap remains a separate follow-up.

STEP 3 — Design & integration

No new long-lived system/plugin/service/controller is introduced. The lifecycle owner for this UI remains Web3AuthenticationPluginAuthenticationScreenController, and state transitions remain in the existing auth FSM. The view changes stay inside LoginSelectionAuthView, consistent with docs/mvc.md view responsibilities.

Teardown/consumption trace: no new subscriptions, callbacks, native resources, or buffers were added. Existing AddListener/Submitted += hooks in LoginSelectionAuthState still have matching cleanup in Exit() via RemoveAllListeners() and Submitted -= OTPLogin.

STEP 4 — Member audit

New/changed public members:

  • LoginSelectionAuthView.OtherLoginContainer: 1 consumer (Show) — serialized Unity reference, acceptable view wiring.
  • LoginSelectionAuthView.ContinueWithTextContainer: 1 consumer (Show) — serialized Unity reference, acceptable view wiring.
  • LoginSelectionAuthView.Show(int, bool, bool): 1 consumer (LoginSelectionAuthState.Enter(int)) — existing view API extended to receive login-method visibility.

No single-use derived predicate or redundant accessor issue found.

STEP 5 — Line-level review

Found one low-risk robustness issue below. Security pass: no security issues found.

STEP 6 — Complexity assessment

COMPLEX: this touches runtime authentication UI and login-method gating, which is user-facing and auth-sensitive even though the code diff is small.

STEP 7 — QA assessment

QA_REQUIRED: YES, because this changes runtime authentication UI behavior and must be verified on Epic and non-Epic builds.

STEP 8 — Non-blocking warnings

No main scene changes. CI is currently partially pending; approval-gate checks are failing only because QA/DEV approvals are still required.

REVIEW_RESULT: PASS ✅
COMPLEXITY: COMPLEX
COMPLEXITY_REASON: Runtime authentication UI and login-method gating are changed for Epic builds.
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by Ignacio Mazzara (<@U9ETM8CJH>) via Slack

Comment thread Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

badge

Warnings not reduced: 14004 => 14062 — remove at least 59 warnings to merge.

Warnings/errors in files changed by this PR (12)
Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs:91  CSharpWarnings::CS8618  Non-nullable field 'animator' is uninitialized. Consider adding the 'required' modifier or declaring the field as nullable.
Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs:92  CSharpWarnings::CS8618  Non-nullable field 'canvasGroup' is uninitialized. Consider adding the 'required' modifier or declaring the field as nullable.
Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs:94  CSharpWarnings::CS8618  Non-nullable field 'loadingSpinner' is uninitialized. Consider adding the 'required' modifier or declaring the field as nullable.
Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs:95  CSharpWarnings::CS8618  Non-nullable field 'mainElementsPanel' is uninitialized. Consider adding the 'required' modifier or declaring the field as nullable.
Assets/DCL/AuthenticationScreenFlow/Views/LoginSelectionAuthView.cs:88  CSharpWarnings::CS8618  Non-nullable field 'moreOptionsPanel' is uninitialized. Consider adding the 'required' modifier or declaring the field as nullable.
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:95  CSharpWarnings::CS8618  Non-nullable members 'DiscordButtonClicked', 'OTPVerified', 'OTPResend', 'ProfileFinalized', 'fsm', 'audio' must contain non-null values when exiting constructor. Consider adding the 'required' modifiers or declaring the members as nullable.
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:90  ConditionalAccessQualifierIsNonNullableAccordingToAPIContract  Conditional access qualifier expression is never null according to nullable reference types' annotations
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:178  ConditionalAccessQualifierIsNonNullableAccordingToAPIContract  Conditional access qualifier expression is never null according to nullable reference types' annotations
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:179  ConditionalAccessQualifierIsNonNullableAccordingToAPIContract  Conditional access qualifier expression is never null according to nullable reference types' annotations
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:295  ConditionalAccessQualifierIsNonNullableAccordingToAPIContract  Conditional access qualifier expression is never null according to nullable reference types' annotations
Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs:75  InconsistentNaming  Name 'CurrentRequestID' does not match rule 'members_should_be_pascal_case'. Suggested name is 'CurrentRequestId'.
Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs:90  RedundantSuppressNullableWarningExpression  The nullable warning suppression expression is redundant

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

badge

All Unity tests passed ✅

TESTS SUITE Result Passed Failed Skipped
EditMode ✅ Passed 24202 0 13
PlayMode ✅ Passed 236 0 5

@anicalbano anicalbano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ Tested on Windows and macOS
✔️ Email OTP
✔️ Metamask
✔️ Google
✔️ New user

31.07.2026_21.25.32_REC.mp4

@anicalbano
anicalbano merged commit bffb71f into main Aug 1, 2026
28 of 29 checks passed
@anicalbano
anicalbano deleted the hotfix/epic-login branch August 1, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic build: web3/social login completely blocked due to missing decentraland:// protocol handler

3 participants