-
Notifications
You must be signed in to change notification settings - Fork 1
Add NFC tag support with unified device selection #3
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
Draft
Copilot
wants to merge
13
commits into
main
Choose a base branch
from
copilot/fix-22fd0e45-2ba1-455e-9309-77440c355a1e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Harry-Chen <[email protected]>
Co-authored-by: Harry-Chen <[email protected]>
Co-authored-by: Harry-Chen <[email protected]>
Copilot
AI
changed the title
[WIP] Support NFC tags
Add NFC tag support with unified device selection
Sep 26, 2025
Copilot finished work on behalf of
Harry-Chen
September 26, 2025 12:48
Contributor
|
@copilot The tests you write do not look very useful, please remove them from the PR. |
Co-authored-by: Harry-Chen <[email protected]>
Author
Removed the test files as requested. The commit b8eb0e2 removes both |
Copilot finished work on behalf of
Harry-Chen
September 26, 2025 12:54
Signed-off-by: Shengqi Chen <[email protected]>
…move redundant start/stop calls in KeysPage
dangfan
approved these changes
Oct 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive NFC tag support for TwoKey, extending the existing CCID-only functionality to work with NFC FIDO2 authenticators. The implementation provides an elegant device selection mechanism when multiple authenticator types are available.
Overview
The changes introduce a unified FIDO API architecture that seamlessly handles both CCID readers and NFC tags through a single interface. Users can now authenticate using NFC-enabled FIDO2 keys on mobile devices while maintaining full backwards compatibility with existing CCID workflows.
Key Features
🔧 Unified Device Management
UnifiedFidoApi: New abstraction layer that automatically detects and manages both CCID and NFC devices📱 NFC Implementation
NfcFidoApi: Complete NFC implementation usingflutter_nfc_kit🎨 Enhanced User Interface
Technical Implementation
The architecture follows the existing
FidoApiinterface pattern, ensuring zero breaking changes:NFC Lifecycle Management
The implementation handles NFC's transient nature through:
transceiveWithReconnect()method for robust communicationDevice Selection Flow
Files Changed
New APIs:
lib/api/nfc_fido_api.dart- NFC FIDO implementationlib/api/unified_fido_api.dart- Unified device selectorEnhanced Components:
lib/viewmodels/keys.dart- Device selection state managementlib/views/keys/keys.dart- Device selection dialoglib/service/authenticator.dart- Device enumeration methodslib/views/keys/widgets/device_info_section.dart- Current device displayBackwards Compatibility
✅ Zero breaking changes - existing CCID workflows continue unchanged
✅ Graceful degradation - falls back to CCID-only on non-mobile platforms
✅ Error handling - clear messages when NFC is unavailable
Fixes #2
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.