⚙️ FEATURE-#269: Add dotflow login with device flow and config file#271
Merged
FernandoCelmer merged 28 commits intodevelopfrom Apr 15, 2026
Merged
⚙️ FEATURE-#269: Add dotflow login with device flow and config file#271FernandoCelmer merged 28 commits intodevelopfrom
FernandoCelmer merged 28 commits intodevelopfrom
Conversation
FernandoCelmer
commented
Apr 15, 2026
Member
Author
There was a problem hiding this comment.
🔍 Code Review
Code issues found: 2
| # | Severity | Comment |
|---|---|---|
| 1 | [Suggestion] | Token file race: writable before chmod |
| 2 | [Suggestion] | slow_down aborts login flow (RFC 8628) |
FernandoCelmer
commented
Apr 15, 2026
FernandoCelmer
commented
Apr 15, 2026
Member
Author
FernandoCelmer
left a comment
There was a problem hiding this comment.
🔍 Code Review (Re-review)
Previous issues: 2/2 fixed ✓
New issues found: 1
| # | Severity | Comment |
|---|---|---|
| 1 | [Suggestion] | Unbounded interval growth on repeated slow_down |
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
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.
Description
Add dotflow login with device flow and config file management
Summary
dotflow loginopens the browser, shows the user_code, polls/auth/cli/token, and saves the resulting API token to~/.dotflow/config.toml.dotflow logoutremoves the saved config.dotflow/core/config_file.pywith TOML-minimal reader/writer and an env-over-fileresolve()helper.ServerDefaultnow resolvesSERVER_BASE_URL/SERVER_USER_TOKENviaresolve()so env wins and the config file is the fallback — CI/CD keeps working when env vars are set, and interactive users get the saved token.dotflow logintrieshttps://www.host.dotflow.io/api/v1first, thenhttps://www.lib.dotflow.io/api/v1onRequestException.--base-url/SERVER_BASE_URLskip the fallback.dotflow login --token <t>bypasses the browser for CI.Motivation and Context
Closes #269
Types of changes
Test plan
ruff check+ruff format --check.pytest tests/cli tests/core— includes 16 new tests (login device flow, base-url fallback, explicit-wins, logout noop/cleanup, config file roundtrip, 0600 perms, env-over-file precedence).Checklist
Pairs with: