CLI custom sync http-base unexpectedly replaces the default OAuth endpoint base
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 28
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Search first
- I searched open and closed issues for custom sync OAuth,
http-base, and Cognito endpoint behavior.
What happened?
Setting a custom CLI sync http-base also changes the implicit OAuth endpoint base. Without explicit OAuth overrides, logseq login derives authorize and token routes under the custom sync origin, for example:
https://<custom-sync-origin>/oauth2/authorize
https://<custom-sync-origin>/oauth2/token
A standard self-hosted DB Sync worker exposes graph, asset, E2EE, and sync routes, but does not expose these OAuth routes. Login or token refresh therefore fails unless users manually add all Cognito endpoint overrides to cli.edn.
Required workaround:
{:http-base "https://<custom-sync-origin>"
:ws-url "wss://<custom-sync-origin>/sync/%s"
:oauth-authorize-endpoint "https://<identity-provider>/oauth2/authorize"
:oauth-token-endpoint "https://<identity-provider>/oauth2/token"
:oauth-logout-endpoint "https://<identity-provider>/logout"}
This is especially easy to miss because initial login and later refresh depend on different OAuth routes.
Reproduce
- Configure only a custom
:http-baseand:ws-urlfor a self-hosted DB Sync worker. - Run
logseq loginor allow an existing token to require refresh. - Observe the derived authorize or token URL.
Expected behavior
Sync transport endpoints and identity-provider endpoints should have independent defaults. Setting http-base should not replace the built-in OAuth provider unless explicit OAuth endpoint configuration requests that behavior.
Platform
- Current CLI repository build
- Self-hosted DB Sync worker
- Cognito authentication
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI configuration handling for :http-base and the OAuth endpoint defaults used by logseq login and token refresh. Reproduce the issue with the listed http-base and ws-url settings, then verify that sync routes still use the custom origin while authorize, token, and logout routes retain their identity-provider defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100