Skip to content

feat(auth): add oauth device login and token refresh#80

Merged
samzong merged 1 commit into
mainfrom
feat/oauth-device-login
Jun 27, 2026
Merged

feat(auth): add oauth device login and token refresh#80
samzong merged 1 commit into
mainfrom
feat/oauth-device-login

Conversation

@samzong

@samzong samzong commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add OAuth 2.0 device authorization login (auth login --auth-type oauth) driven by cli.yaml auth.login with type oauth_device, including start/token polling, persisted bearer credentials in hosts.yml, proactive refresh before requests, and a single 401 retry via RefreshAuth.

Verification

go test ./internal/auth/... ./pkg/config/... ./pkg/runtime/...

All tests passed.

Compatibility

  • New optional auth.login fields: type: oauth_device, start_path, token_path, refresh_path
  • New HostEntry fields: login_type, login_provider, oauth_token, oauth_refresh_token, oauth_expires_at
  • New --auth-type oauth and --provider flags on auth login
  • Generated Skill guidance updated for OAuth device login flows
  • Existing bearer/apikey/basic auth flows unchanged

Checklist

  • Tests or focused verification cover the changed surface.
  • User-facing behavior changes are documented.
  • Generated output under internal/generated/, .cache/, and ad-hoc skills/<cli-name>/ directories is not committed.
  • Commits are signed off when this is ready to merge.

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong samzong merged commit 2977885 into main Jun 27, 2026
3 checks passed
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.

1 participant