Skip to content

Fix GitHub login redirect_uri after the custom domain - #76

Closed
shangeethsivan wants to merge 1 commit into
mainfrom
cursor/github-oauth-callback-ec07
Closed

shangeethsivan wants to merge 1 commit into
mainfrom
cursor/github-oauth-callback-ec07

Conversation

@shangeethsivan

Copy link
Copy Markdown
Owner

GitHub shows Be careful! The redirect_uri is not associated with this application because Syncidian sends https://syncidian.com/api/v1/auth/github/callback, and the GitHub App still has the old Railway callback (or is missing this URL).

This PR

  • OAuth authorize + token exchange always use SYNCIDIAN_PUBLIC_URL (githubBase), so a Railway or Tailscale host cannot send a different redirect_uri.
  • The operator GitHub App card always shows the exact Callback URL and a link to the app settings.
  • Docs call out the GitHub “Be careful!” page after a custom-domain move.

You still have to update the GitHub App (cannot be done from the API)

  1. Open github.com/settings/apps/syncidian (or the org equivalent).
  2. Under Identifying and authorizing users → Callback URL, set or add:
https://syncidian.com/api/v1/auth/github/callback
  1. Also set Homepage / Setup / Webhook to the https://syncidian.com/... URLs from /admin if they still point at *.up.railway.app.
  2. Save.

Do not create a new GitHub App. Keep the existing App ID, Client ID, secret, and private key.

Open in Web Open in Cursor 

Sign-in was using the incoming hostname as redirect_uri. After the custom
domain, that no longer matches the GitHub App. Always use SYNCIDIAN_PUBLIC_URL
and show the exact Callback URL on the operator page.

Co-authored-by: shangeeth95 <shangeeth95@gmail.com>
@shangeethsivan
shangeethsivan marked this pull request as ready for review September 3, 2026 19:05
@shangeethsivan

Copy link
Copy Markdown
Owner Author

Closing as it works now

@shangeethsivan
shangeethsivan deleted the cursor/github-oauth-callback-ec07 branch September 3, 2026 20:49
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.

2 participants