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

[BITAU-139] Add Menu Item to Turn on Authenticator Sync #1048

Conversation

brant-livefront
Copy link
Collaborator

🎟️ Tracking

BITAU-139

📔 Objective

This PR adds a section to the Settings -> Account Security screen that includes a toggle to turn the sync with Authenticator. This is hidden behind the feature flag. Therefore, it should not affect this view in any way unless the feature flag is turned on. When it's turned on, you can use this to turn on sync for the current account (which will kick off the syncing process).

📸 Screenshots

Simulator Screenshot - iPhone 15 Pro - 2024-10-16 at 13 26 02

⏰ 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 Oct 16, 2024

Logo
Checkmarx One – Scan Summary & Details6898d765-1236-4d58-b2f1-27ae212329b5

No New Or Fixed Issues Found

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.30%. Comparing base (2b2652c) to head (fd03e0c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1048   +/-   ##
=======================================
  Coverage   89.29%   89.30%           
=======================================
  Files         670      670           
  Lines       42056    42093   +37     
=======================================
+ Hits        37553    37590   +37     
  Misses       4503     4503           

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

Comment on lines 171 to 173
state.isAuthenticatorSyncEnabled = try await services.stateService.getSyncToAuthenticator()
state.shouldShowAuthenticatorSyncSection =
await services.configService.getFeatureFlag(.enableAuthenticatorSync)
Copy link
Member

Choose a reason for hiding this comment

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

🎨 Even though it may be a little, we can improve the performance of loading this if the feature flag is off then we don't need to call try await services.stateService.getSyncToAuthenticator(); so:

Suggested change
state.isAuthenticatorSyncEnabled = try await services.stateService.getSyncToAuthenticator()
state.shouldShowAuthenticatorSyncSection =
await services.configService.getFeatureFlag(.enableAuthenticatorSync)
state.shouldShowAuthenticatorSyncSection =
await services.configService.getFeatureFlag(.enableAuthenticatorSync)
if state.shouldShowAuthenticatorSyncSection {
state.isAuthenticatorSyncEnabled = try await services.stateService.getSyncToAuthenticator()
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 Good optimization. Added that in the latest commit.

@brant-livefront brant-livefront merged commit 1bc1dda into main Oct 17, 2024
9 checks passed
@brant-livefront brant-livefront deleted the brant/BITAU-139-add-menu-item-to-turn-on-authenticator-sync branch October 17, 2024 22:37
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.

3 participants