Skip to content

fix(oauth): ask Instagram and TikTok for a fresh sign-in when connecting - #1814

Merged
sung17 merged 1 commit into
mainfrom
fix/oauth-force-reauth
Nov 28, 2026
Merged

sung17 merged 1 commit into
mainfrom
fix/oauth-force-reauth

Conversation

@sung17

@sung17 sung17 commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

Why

A customer reported that connecting Instagram and TikTok on a phone often fails: the login gets pushed into the Instagram/TikTok app, or the account already signed in there gets connected by mistake. They suggested letting users type their credentials on the web page instead.

What changes

  • Instagram (Business Login): the authorize URL now sends force_reauth=true. Meta added this parameter on June 14, 2025 to "fix the broken login experience", and recommends it "especially if your app users log in on mobile devices" (changelog, parameter reference). Instagram then asks for the professional account's credentials even when the browser or app is already signed in. Both URL builders (integration.ts authorizeUrl and apis/auth.ts generateAuthUrl) use one constant.
  • TikTok publishing connect: the authorize URL now sends disable_auto_auth=1, the same value the inbox connect already sends. TikTok then always shows its authorization page instead of skipping it for a signed-in session (Login Kit for Web). TikTok does not document the default.

Trade-offs and limits

  • Users have to type their Instagram password on every connect or reconnect. We accept this in exchange for fewer broken mobile logins and no silent wrong-account connects.
  • No parameter from Meta or TikTok stops the phone from opening the native app. That is the operating system's universal-link behaviour. TikTok has no documented equivalent of force_reauth: disable_auto_auth only forces the consent page, not a password prompt.

Tests

  • integrations/instagram/__tests__/connection.test.ts: new test asserting force_reauth=true on the authorize URL.
  • integrations/tiktok/__tests__/publisher-social-account.test.ts: asserts disable_auto_auth=1.
  • Instagram, TikTok and builder start-social-account-oauth tests pass. pnpm lint passes. Type check passes for 17 packages, including builder and worker (pre-commit hook).

🤖 Generated with Claude Code

Instagram Business Login now sends force_reauth=true, which Meta added to
fix a broken login and recommends for users connecting on mobile. Instagram
asks for the professional account's credentials instead of reusing the
account already signed in to the browser or app.

The TikTok publishing connect now sends disable_auto_auth=1, as the inbox
connect already does, so TikTok always shows its authorization page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 28, 2026
@sung17
sung17 merged commit 222f86a into main Nov 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant