feat: improve oauth login inputs and callback UX#31
Conversation
271ed70 to
ba1f7c4
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This updates
ol auth loginto accept--client-idand--base-urlflags 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, thenOUTLINE_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