-
Notifications
You must be signed in to change notification settings - Fork 1
feature/github token auth #147
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
Merged
Merged
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
Contributor
robtaylor
commented
Nov 11, 2025
- Refactor: Reorganize codebase into focused modules
- Documentation clean up
- Fix input.json format documentation to match implementation
- Disable AutoAPI generation due to CI import issues
- Make pin allocation error actionable
- Fix heartbeat pin collision with clock pin
- Update Openframe package terminology
- Fix documentation issues from review
- Improve custom simulation model documentation
- Add warning about custom model API stability
- packaging: Fix base model_post_init to not wipe self._ordered_pins ...
- Add doctest infrastructure and fix failing test
- Convert strategic examples to testable doctests
- Document doctest strategy with comprehensive comments
- Rename chipflow_lib to chipflow with backward compatibility
- Minimize backward compatibility API surface
- Fix E402 lint errors in backward compatibility stubs
- Add JTAGSignature to backward compatibility exports
- Add automatic authentication with GitHub token and device flow support
- Add comprehensive unit tests for authentication module
|
|
This simplifies authentication for ChipFlow users by automatically trying multiple authentication methods in priority order. Authentication flow: 1. CHIPFLOW_API_KEY environment variable (if set) 2. Saved credentials from previous login (if exists) 3. GitHub CLI token authentication (if gh is available) 4. OAuth 2.0 Device Flow (as fallback) New features: - Add chipflow/auth.py module with get_api_key() helper - Add chipflow auth login/logout CLI commands - Update silicon_step.py to use automatic authentication - Save credentials to ~/.config/chipflow/credentials for reuse - Support for GitHub token endpoint (POST /auth/github-token) - Support for device flow endpoints Benefits: - Users just run "chipflow auth login" once - Instant authentication for users with gh CLI - Automatic fallback to device flow if needed - No manual API key copying required - Credentials persist across sessions Documentation: - Update getting-started.rst with new auth flow - Update chipflow-commands.rst with auth command docs - Add examples for both login methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Tests cover all authentication flows: - Helper functions (is_gh_authenticated, get_gh_token, save/load) - GitHub token authentication with success and error cases - Device flow authentication with pending/success/timeout - Main get_api_key function with priority fallback logic - Force login functionality All 21 tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
a1f68ab to
a6e1bcd
Compare
a6e1bcd to
0fa3c1b
Compare
robtaylor
commented
Nov 11, 2025
Contributor
Author
robtaylor
left a comment
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.
looks good
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.