trypost/app/Http/Controllers
Paulo Castellano 49ccfe851e fix(linkedin,pinterest): split CSV/space-joined OAuth scopes before saving
LinkedIn and Pinterest's OAuth providers return the granted scope list
joined by comma (LinkedIn) or space-in-one-element (Pinterest), but
Socialite's scope splitter doesn't match either, so 'approvedScopes'
lands as a single-element array containing the whole list:

  LinkedIn:  ['email,openid,profile,r_basicprofile,w_member_social']
  Pinterest: ['boards:read boards:write pins:read pins:write user_accounts:read']

That breaks the publish-time scope check in PublishToSocialPlatform
(array_diff does exact string compare), surfacing as
'Missing permissions: w_member_social. Please reconnect your account'
even though the scopes were actually granted at the provider.

Fix is inline at each callback — re-split before saving. Each provider
has its own quirk (LinkedIn = comma, Pinterest = space), so each
controller handles its own separator.

Tests added: callback splits the joined approvedScopes into individual
tokens for both providers.
2026-05-14 10:55:53 -03:00
..
Api feat: add multipart media upload endpoint and split URL flow 2026-05-04 18:00:03 -03:00
App refactor(posts): use $request->collect() + when() for label filter 2026-05-14 10:02:38 -03:00
Auth fix(linkedin,pinterest): split CSV/space-joined OAuth scopes before saving 2026-05-14 10:55:53 -03:00
Controller.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00