-
Notifications
You must be signed in to change notification settings - Fork 30
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-8216] Add warning to people who don't have two-factor authentication turned on #1208
base: main
Are you sure you want to change the base?
Conversation
No New Or Fixed Issues Found |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1208 +/- ##
==========================================
+ Coverage 89.51% 89.59% +0.08%
==========================================
Files 699 709 +10
Lines 44556 44947 +391
==========================================
+ Hits 39884 40271 +387
- Misses 4672 4676 +4 ☔ View full report in Codecov by Sentry. |
.buttonStyle(.secondary()) | ||
} | ||
|
||
Spacer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Is this Spacer()
necessary? It seems like this could be for pushing up the content, but the content in the scroll view should already be at the top? Or if it's just padding, I think the scroll view modifier also adds bottom padding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time I had it in there, I needed it to get things pinned to the top, but I also changed around how this view was constructed since then. I'll double-check.
.buttonStyle(.primary()) | ||
} | ||
.dynamicTypeSize(...DynamicTypeSize.xxxLarge) | ||
.padding(.horizontal, 16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I think this might be adding double horizontal padding, since the scrollView()
modifier also adds horizontal padding. scrollView()
also adds the background color.
/// The delegate for this coordinator, used to notify when the user logs out. | ||
private weak var delegate: VaultCoordinatorDelegate? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, copy-paste artifact :(
/// the two-factor notice, and displaying it if so. | ||
/// | ||
protocol TwoFactorNoticeHelper { | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Missing docs?
BitwardenShared/UI/Auth/TwoFactorNotice/TwoFactorNoticeHelperTests.swift
Show resolved
Hide resolved
Text(LocalizedStringKey(Localizations.doYouHaveReliableAccessToYourEmail("person\u{2060}@example.com"))) | ||
.styleGuide(.body) | ||
.foregroundColor(Asset.Colors.textPrimary.swiftUIColor) | ||
.accessibilityHidden(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Why hide this from accessibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I'm not sure where that came from. Probably a copy-paste thing? But yeah, I don't think it should be hidden
send: EmailAccessAction.canAccessEmailChanged | ||
)) | ||
.toggleStyle(.bitwarden) | ||
.accessibilityIdentifier("ItemFavoriteToggle") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Is this the right accessibility identifier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, probably not. Thanks copy-paste!
func test_remindMeLater_tap() throws { | ||
let button = try subject.inspect().find(button: Localizations.remindMeLater) | ||
try button.tap() | ||
|
||
waitFor(!processor.effects.isEmpty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎨 This could use find(asyncButton:)
to avoid waiting.
"NothingAvailableToAutofill" = "Nothing available to autofill"; | ||
"FailedToGenerateVerificationCode" = "Failed to generate verification code"; | ||
"FailedToAutofillItem" = "Failed to autofill item %1$@"; | ||
"ExportingFailed" = "Exporting failed"; | ||
"YouMayNeedToEnableDevicePasscodeOrBiometrics" = "You may need to enable device passcode or biometrics."; | ||
"TurnOnTwoStepLoginConfirmation" = "You can turn on two-step login on the bitwarden.com web vault. Do you want to visit the website now?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Should bitwarden.com
here be replaced with the user's web vault URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I was going off of the fact that the change email confirmation just says bitwarden.com
. That's a good question, though.
case .changeAccountEmailTapped: | ||
coordinator.showAlert(.changeEmailAlert { | ||
self.state.url = self.services.environmentService.changeEmailURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ If I navigate to the web to turn on two-factor and then come back to the app, will I still be on this screen? How do you dismiss the view in that case? Or does enabling two-factor log you out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a discussion about this on the Android ticket, but the end result is right now the user will need to kill and re-run the app to pick up on the change.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-8216
📔 Objective
This is still a work in progress; I have it set up as a draft to help me track things as I tie up the remaining problems and do some additional refactoring. Some of these changes will be pulled into other PRs for simplicity.
📸 Screenshots
⏰ Reminders before review
🦮 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