fix: default redirectUri matches Harper dev config (http://localhost:9926) - #41
Merged
Conversation
…9926) Plugin defaulted to `https://localhost:9953/oauth/callback`, but Harper v5 dev mode serves plain HTTP on port 9926 (see utility/install/installer.js:50 `HTTP_PORT: 9926`; `HTTP_SECUREPORT` is null by default in dev). Users booted Harper, saw 9926 HTTP, and got a redirect mismatch the first time they tried OAuth. Changing the default to `http://localhost:9926/oauth/callback` so the out-of-the-box flow works. Users running with TLS can still override to https + their own port via config. Updated: - config.yaml default - src/lib/config.ts fallback - matching test assertions (config.test.js) - test fixture redirectUris (OAuthProvider, handlers) for consistency Closes #30. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
No blockers found. |
6 tasks
6 tasks
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.
Summary
Plugin defaulted to
https://localhost:9953/oauth/callback, but Harper v5 dev mode serves plain HTTP on port 9926 (seeutility/install/installer.js:50—HTTP_PORT: 9926,HTTP_SECUREPORTnull by default in dev). Users booted Harper, saw 9926 HTTP, and got a redirect mismatch the first time they wired up an OAuth provider.Changing the default to
http://localhost:9926/oauth/callbackso the out-of-the-box flow works. Users running with TLS can still override viaredirectUriin config.Changes
config.yamldefaultsrc/lib/config.tsfallback inbuildProviderConfigtest/lib/config.test.jsredirectUrivalues intest/lib/OAuthProvider.test.jsandtest/lib/handlers.test.jsfor consistencyTest plan
npm test— 422 pass, 0 fail, 2 skipbun test— 422 pass, 0 fail, 2 skipnpm run lintpassesCloses #30