Skip to content

fix(threads): use threads.com for the OAuth authorize URL - #1819

Open
giladresisi wants to merge 1 commit into
mainfrom
fix/threads-oauth-domain
Open

fix(threads): use threads.com for the OAuth authorize URL#1819
giladresisi wants to merge 1 commit into
mainfrom
fix/threads-oauth-domain

Conversation

@giladresisi

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce?

Bug fix

Why was this change needed?

A self-hoster reported that clicking "Add Threads" landed on the Threads homepage instead of the authorization screen. Threads migrated its website from threads.net to threads.com, and threads.net/oauth/authorize now returns a 301 Moved Permanently to threads.com (verified with curl and in the production network tab) — so every connect flow today goes through a cross-domain redirect on the legacy domain before reaching the real authorize endpoint. For some users that redirect drops the OAuth query parameters, so they land on the homepage and the consent screen never appears. The reporting user confirmed that replaying the exact same /oauth/authorize path on threads.com shows the consent screen and completes the connection.

Note the redirect preserves parameters for most users (the flow works in production today), which is why this wasn't caught earlier — but it is demonstrably lossy for some users, and linking directly to threads.com removes the dependency on that redirect entirely. Verified locally: with this change the browser's first request goes straight to www.threads.com/oauth/authorize with all parameters intact and the flow completes.

This changes only the browser-facing authorize URL. The server-to-server graph.threads.net endpoints are unchanged — Meta's API changelog (June 6, 2025) states the API is accessible on both graph.threads.com and graph.threads.net.

Other information:

None

Checklist:

  • I have read the CONTRIBUTING guide.
  • I have signed the Contributor License Agreement (CLA)
  • I confirm I have not used AI to submit this PR or generate code for it.
  • I checked that there were no similar issues or PRs already open for this.
  • This PR fixes just ONE issue

Threads moved its website from threads.net to threads.com, and
threads.net/oauth/authorize now 301-redirects to threads.com. For some
users that legacy-domain redirect drops the OAuth query parameters,
landing them on the Threads homepage instead of the consent screen.
Pointing the authorize URL directly at threads.com skips the redirect.
The graph.threads.net API endpoints are unaffected and remain supported.
@postiz-contribution postiz-contribution Bot added the contribution:approved Approved contributor label Aug 2, 2026
@postiz-agent

postiz-agent Bot commented Aug 2, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution:approved Approved contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant