Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM-14632: Revert to legacy create account flow if updated environment doesn't support email verification #1161

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

matt-livefront
Copy link
Collaborator

@matt-livefront matt-livefront commented Nov 22, 2024

🎟️ Tracking

PM-14632

📔 Objective

From the create account screen in the email verification flow, if you change the environment to an environment that doesn't support email verification, attempting to create an account will fail because the environment doesn't have the updated endpoints. This changes that to switch back to the legacy create account flow.

📸 Screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-22.at.11.40.04.mp4

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Nov 22, 2024

Logo
Checkmarx One – Scan Summary & Details36d309ee-60be-4527-a5c9-f69432e24016

Fixed Issues

Severity Issue Source File / Package
LOW Unpinned Actions Full Length Commit SHA /crowdin-push.yml: 26

Comment on lines 238 to 247
if await !services.configService.getFeatureFlag(
.emailVerification,
defaultValue: false,
forceRefresh: true,
isPreAuth: true
) {
// If email verification isn't enabled in the selected environment, switch to the
// legacy create account flow.
delegate?.switchToLegacyCreateAccountFlow()
}
Copy link
Member

Choose a reason for hiding this comment

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

🤔 How does this behave on really slow internet connection scenarios?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It won't switch you back to the legacy flow until the request completes, but it doesn't block the UI or anything. Hopefully this is just a temporary change until the legacy flow is removed.

Copy link
Member

Choose a reason for hiding this comment

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

And does this flow get cancelled if the user goes to another screen (back or forwards) while the request is in progress? Or after the request completes in another screen the user will be redirected? Again in slow connection scenarios.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, not until the request times out at least. I added a check to only notify the delegate if the view is still visible.

@matt-livefront matt-livefront merged commit b0b6114 into main Dec 3, 2024
7 checks passed
@matt-livefront matt-livefront deleted the matt/PM-14632-email-verification-change-env branch December 3, 2024 17:50
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.39%. Comparing base (c564772) to head (1db6c52).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1161      +/-   ##
==========================================
+ Coverage   89.38%   89.39%   +0.01%     
==========================================
  Files         688      688              
  Lines       43741    43769      +28     
==========================================
+ Hits        39098    39129      +31     
+ Misses       4643     4640       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants