Skip to content

feat(cli): add browser-based auth login#4887

Merged
DIYgod merged 1 commit intodevfrom
DIYgod/cli-browser-login
Feb 27, 2026
Merged

feat(cli): add browser-based auth login#4887
DIYgod merged 1 commit intodevfrom
DIYgod/cli-browser-login

Conversation

@DIYgod
Copy link
Member

@DIYgod DIYgod commented Feb 27, 2026

Description

This PR adds browser-based auth flow for folo auth login so users can sign in without manually pasting a token.
CLI now starts a localhost callback server, opens the login page, and saves the returned token automatically, while keeping --token supported.
Login URL resolution now uses DEFAULT_VALUES mapping in packages/internal/shared/src/env.common.ts and falls back to API origin when unmapped.
SSR login now handles cli_callback safely (http://127.0.0.1/localhost only), generates one-time token, and redirects back to the CLI callback URL.
It also updates CLI auth docs/messages and adds unit tests for login URL mapping.

PR Type

  • Feature
  • Bugfix
  • Hotfix
  • Other (please describe):

Screenshots (if UI change)

N/A

Demo Video (if new feature)

N/A

Linked Issues

N/A

Additional context

Please focus review on the browser login callback flow and SSR cli_callback redirect handling.

Changelog

  • I have updated the changelog/next.md with my changes.

@safedep
Copy link

safedep bot commented Feb 27, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@DIYgod DIYgod merged commit 49f69f4 into dev Feb 27, 2026
7 checks passed
@DIYgod DIYgod deleted the DIYgod/cli-browser-login branch February 27, 2026 08:52
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