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-12012] Save region during account creation #946

Merged
merged 9 commits into from
Sep 19, 2024

Conversation

andrebispo5
Copy link
Contributor

@andrebispo5 andrebispo5 commented Sep 18, 2024

🎟️ Tracking

PM-12012

📔 Objective

This update addresses an issue with the account creation process, which is divided into two steps. Currently, users can change the application region before completing the second step, potentially leading to registration in a different environment from where they began.

To resolve this, we are now saving pre-authentication URLs alongside the email address in the application state. These URLs will be loaded when the user initiates the completion of their registration, ensuring a consistent experience throughout the process.

📸 Screenshots

RPReplay_Final1726655243.mov

⏰ 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

# Conflicts:
#	BitwardenShared/UI/Platform/Application/Support/Localizations/en.lproj/Localizable.strings
Copy link
Contributor

github-actions bot commented Sep 18, 2024

Logo
Checkmarx One – Scan Summary & Detailsb3f52bfb-1cde-4cbd-a8b8-0e3e2cf5313c

No New Or Fixed Issues Found

Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

🤔 One caveat is that one could create two accounts in different regions using the same email which would result in the last one receiving both actions from the verification email. I guess it's an extreme edge case but wanted to point it out.

🤔 What do you think about changing the name of getPreAuthEnvironmentUrlsByEmail (and setter) to something like getPreCreationEnvironmentUrlsByEmail? Because as far as I see this is used in creation. I'm also fine if you want to stick with the current name but maybe it's clearer the other way.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.69%. Comparing base (753e539) to head (f4615e8).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...teRegistration/CompleteRegistrationProcessor.swift 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #946      +/-   ##
==========================================
+ Coverage   88.68%   88.69%   +0.01%     
==========================================
  Files         622      622              
  Lines       39374    39419      +45     
==========================================
+ Hits        34918    34964      +46     
+ Misses       4456     4455       -1     

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

@andrebispo5 andrebispo5 merged commit a8d5a6c into main Sep 19, 2024
10 checks passed
@andrebispo5 andrebispo5 deleted the pm-12012/save-region-registration branch September 19, 2024 15:54
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