Repository navigation
fix(oauth): ask Instagram and TikTok for a fresh sign-in when connecting - #1814
Merged
Merged
Conversation
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]>
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.
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
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.tsauthorizeUrlandapis/auth.tsgenerateAuthUrl) use one constant.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
force_reauth:disable_auto_authonly forces the consent page, not a password prompt.Tests
integrations/instagram/__tests__/connection.test.ts: new test assertingforce_reauth=trueon the authorize URL.integrations/tiktok/__tests__/publisher-social-account.test.ts: assertsdisable_auto_auth=1.start-social-account-oauthtests pass.pnpm lintpasses. Type check passes for 17 packages, including builder and worker (pre-commit hook).🤖 Generated with Claude Code