Skip to content

feat: improve oauth login inputs and callback UX#31

Merged
gnapse merged 4 commits intomainfrom
ernesto/oauth-config-flow
Mar 4, 2026
Merged

feat: improve oauth login inputs and callback UX#31
gnapse merged 4 commits intomainfrom
ernesto/oauth-config-flow

Conversation

@gnapse
Copy link
Collaborator

@gnapse gnapse commented Mar 3, 2026

This updates ol auth login to accept --client-id and --base-url flags while following a bring-your-own OAuth credentials approach, with no hardcoded client ID in the repo.

The login flow now resolves base URL from --base-url, then OUTLINE_URL, and prompts only when neither is provided. The localhost OAuth callback server now returns styled UTF-8 HTML success/error pages with escaped messages, and the promise cleanup path was adjusted to avoid unhandled rejection noise.

README auth docs were updated for the new flags and OAuth callback behavior is covered by a new test file for success, state mismatch, and provider error cases.

Demo

Image CleanShot 2026-03-03 at 21 15 43

@gnapse gnapse force-pushed the ernesto/oauth-config-flow branch from 271ed70 to ba1f7c4 Compare March 3, 2026 20:34
@gnapse gnapse changed the title Improve OAuth login UX and auth config options feat: improve oauth login inputs and callback UX Mar 3, 2026
@gnapse gnapse self-assigned this Mar 3, 2026
Copy link

@doist-bot doist-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR introduces solid improvements to the OAuth login flow by adding convenient configuration flags and enhancing the local callback server's UX and test coverage. The implementation is clean and will noticeably streamline the authentication process. There is just a minor piece of dead code noted in the client ID prompt logic to review, where the fallback handling for existing client IDs might need a small adjustment depending on the intended prompt behavior.

Share FeedbackReview Logs

@gnapse gnapse marked this pull request as draft March 3, 2026 20:44
@gnapse gnapse requested a review from henningmu March 3, 2026 20:44
@gnapse gnapse marked this pull request as ready for review March 3, 2026 20:50
Copy link

@doist-bot doist-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request improves the OAuth login workflow by introducing support for client ID and base URL flags and enhancing the callback server with styled HTML feedback. These updates provide greater flexibility for various environments while ensuring a more polished and reliable authentication experience for users, and no issues were flagged during the review.

Share FeedbackReview Logs

@gnapse gnapse merged commit 3011b28 into main Mar 4, 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