Skip to content

Conversation

@tomhung
Copy link

@tomhung tomhung commented Dec 4, 2025

Summary

When autofilling credentials for a resource that has TOTP configured, automatically copy the current TOTP code to the clipboard. This streamlines the login process for 2FA-enabled accounts.

Changes

  • Add TotpService to generate TOTP codes using existing jsSHA dependency (RFC 6238)
  • Modify AutofillController to copy TOTP after filling credentials
  • TOTP is copied with 30-second auto-clear (using existing CopyToClipboardService)
  • Silently handles errors to not disrupt autofill if TOTP copy fails

Test plan

  • Create a resource with TOTP configured
  • Go to a login page matching that resource
  • Click the resource to autofill credentials
  • Verify TOTP code is now in clipboard (Ctrl+V)
  • Verify clipboard auto-clears after 30 seconds

When autofilling credentials for a resource that has TOTP configured,
automatically copy the current TOTP code to the clipboard. This allows
users to quickly paste the TOTP code after the password is filled,
streamlining the login process for 2FA-enabled accounts.

- Add TotpService to generate TOTP codes using jsSHA (RFC 6238)
- Modify AutofillController to copy TOTP after filling credentials
- TOTP is copied with 30-second auto-clear (using existing clipboard service)
- Silently handles errors to not disrupt autofill if TOTP copy fails
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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