Skip to content

Re-open Meta's page selection on every connect with auth_type=rerequest - #314

Open
gynsus wants to merge 1 commit into
trypostit:mainfrom
gynsus:pr/meta-rerequest
Open

Re-open Meta's page selection on every connect with auth_type=rerequest#314
gynsus wants to merge 1 commit into
trypostit:mainfrom
gynsus:pr/meta-rerequest

Conversation

@gynsus

@gynsus gynsus commented Aug 30, 2026

Copy link
Copy Markdown

The trap

Create a new Facebook Page, hit "Connect Facebook" — and TryPost silently connects the old Page again. No page picker, no way to reach the new Page from inside the app.

Meta's OAuth dialog reuses the previous grant, including its page selection: once the app has been authorized for one Page, subsequent logins skip the consent screen entirely and /me/accounts keeps returning only the originally ticked Pages. Disconnecting in TryPost doesn't help, because the grant lives on Meta's side. The only escape is manual surgery in facebook.com → Settings → Business Integrations, which users find only after filing a support ticket (ours did).

The fix

Pass auth_type=rerequest on the OAuth redirect for both Meta flows (Facebook and Instagram-via-Facebook). Meta then re-opens the consent dialog on every connect, with the "Edit settings" page selection available, so adding a newly created Page is just: connect again → tick the Page.

The cost is one extra consent screen for users reconnecting an unchanged setup — which is also the screen that tells them what they previously granted, so it's arguably a feature.

Testing

FacebookControllerTest / InstagramFacebookControllerTest pass, with the connect-redirect mock asserting the new parameter. Verified live: with rerequest in place, a freshly created Page shows up in the page selection dialog on the very next connect.

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.

1 participant