trypost/app/Http/Controllers/Auth
Paulo Castellano 074a66f1e2 fix(linkedin-page): persist OAuth scopes through the page-picker flow
The LinkedIn Page connection has a two-step OAuth: first the
`callback` stashes the Socialite user in `linkedin_page_pending` and
redirects to the page picker, then `select` finalizes by writing the
chosen organization to social_accounts. The pending payload was missing
`approved_scopes`, and both finalize paths (`update` for reconnect,
`updateOrCreate` for first connect) never wrote the `scopes` column.

Result: every LinkedIn Page account had `scopes = NULL` in the DB,
the publish-time scope check saw `w_organization_social` as missing
and blocked every post with 'Missing permissions. Please reconnect
your account.'

Fix: stash `approved_scopes` in the session payload, then in both
finalize paths persist it with the same comma-split treatment used by
the LinkedIn personal controller (the LinkedIn-OpenID provider has the
same separator quirk — granted scopes come CSV-joined inside a
single Socialite array element).

Test: `linkedin page select splits comma-separated approvedScopes
before saving` covers the persist + split path.
2026-05-14 11:48:30 -03:00
..
Concerns feat: capture signup UTMs/IP and add GitHub OAuth login 2026-05-04 18:42:25 -03:00
AcceptInviteController.php feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
AuthenticatedSessionController.php fix: security audit - IDOR, open redirect, authorization, session fixes 2026-03-30 14:58:25 -03:00
BlueskyController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
EmailVerificationNotificationController.php refactor: restructure to Actions, subdomain routes (app/api), API tokens 2026-03-29 19:24:28 -03:00
EmailVerificationPromptController.php refactor: restructure to Actions, subdomain routes (app/api), API tokens 2026-03-29 19:24:28 -03:00
FacebookController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
GitHubController.php revert: keep one OAuth callback URL per provider 2026-05-04 19:42:13 -03:00
GoogleController.php revert: keep one OAuth callback URL per provider 2026-05-04 19:42:13 -03:00
InstagramController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
InstagramFacebookController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
LinkedInController.php refactor: remove debug logging from social OAuth controllers 2026-05-14 11:23:40 -03:00
LinkedInPageController.php fix(linkedin-page): persist OAuth scopes through the page-picker flow 2026-05-14 11:48:30 -03:00
MastodonController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
NewPasswordController.php feat: improvements on invites 2026-01-20 16:53:54 -03:00
PasswordResetLinkController.php feat: improvements on invites 2026-01-20 16:53:54 -03:00
PinterestController.php refactor: remove debug logging from social OAuth controllers 2026-05-14 11:23:40 -03:00
RegisteredUserController.php feat: capture signup UTMs/IP and add GitHub OAuth login 2026-05-04 18:42:25 -03:00
SignupSuccessController.php chore: tracking, gtm and more 2026-03-30 21:32:43 -03:00
SocialController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
ThreadsController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00
TikTokController.php refactor: remove debug logging from social OAuth controllers 2026-05-14 11:23:40 -03:00
VerifyEmailController.php refactor: restructure to Actions, subdomain routes (app/api), API tokens 2026-03-29 19:24:28 -03:00
XController.php feat: redesign accounts page with multi-account support 2026-04-14 19:48:35 -03:00
YouTubeController.php feat: localize OAuth popup callback messages across 12 controllers 2026-05-07 14:03:52 -03:00