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

Credential provider QuickType support #3696

Merged

Conversation

amddg44
Copy link
Contributor

@amddg44 amddg44 commented Dec 7, 2024

Task/Issue URL:
Tech Design URL:
CC:

Description:
Adds support for QuickType to the Credential provider extension (along with deduplication logic for the QuickType prompts)

Steps to test this PR:

  1. Launch the Alpha target of the app
  2. Enable Sync (if not already enabled) and save a credential on that other device
  3. Save some passwords for https://autofill.me/form/login-simple. Also add one with a duplicate username and password, but with a different subdomain e.g. test.autofill.me
  4. Confirm the credential provider extension is enabled and visit autofill.me in Safari
  5. Confirm saved passwords for the site are presented, and that the duplicate credential is only presented once
  6. Confirm the credential saved via Sync is also a QuickType suggestion
  7. Confirm authentication is required to fill a QuickType credential & take note of the credential selected
  8. Refresh the ‘autofill.me` site and confirm the most recently chosen QuickType credential is top of the suggestions

<!—
Before submitting a PR, please ensure you have tested the combinations you expect the reviewer to test, then delete configurations you know do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

Copy link

github-actions bot commented Dec 7, 2024

Fails
🚫 Please, don't forget to add a link to the internal task
Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.
Messages
📖

You seem to be updating localized strings. Make sure that you request translations and include translated strings before you ship your change. See Localization Guidelines for more information.

Generated by 🚫 dangerJS against 3504440

@amddg44 amddg44 marked this pull request as ready for review December 9, 2024 11:58
override func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity) {
// A quirk here is calling .canAuthenticate in this one scenario actually triggers the prompt to authentication
// Calling .authenticate here results in the extension attempting to present a non-existent view controller causing weird UI
if authenticator.canAuthenticateViaBiometrics() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If biometrics authentication is not possible (or no device auth is set), userInteractionRequired is returned here. This triggers a call to prepareInterfaceToProvideCredential(for credentialRequest: any ASCredentialRequest) which presents a lock screen UI and complete authentication & error handling

Copy link
Contributor

@aataraxiaa aataraxiaa left a comment

Choose a reason for hiding this comment

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

Nice one @amddg44, tested and works as expected.

@amddg44 amddg44 merged commit 4881936 into feature/system-credential-provider Dec 9, 2024
12 of 13 checks passed
@amddg44 amddg44 deleted the anya/credential-provider-quicktype branch December 9, 2024 14:42
amddg44 added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Dec 9, 2024
Task/Issue URL: 
iOS PR: duckduckgo/iOS#3696
macOS PR: duckduckgo/macos-browser#3648
What kind of version bump will this require?: Minor

**Description**:
Adds support for QuickType to the Credential provider extension along
with deduplication logic
@amddg44 amddg44 mentioned this pull request Dec 9, 2024
14 tasks
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