trypost/app/Http/Controllers/Auth
Paulo Castellano d89f6ceede fix: let authenticated users connect Google/GitHub from Settings
The Connect button on /settings/authentication pointed at the
auth.{provider}.redirect routes that live behind `guest` middleware,
so authenticated users were bounced to /app/home before reaching
Socialite. The OAuth callback also needed to handle two flows
(signup/login vs link to current user) but had no branch for the
second case — meaning a different-email GitHub account would have
been registered as a new user, logging the original session out.

Splits the flows by intent:

- New `app.authentication.connect-provider` route in the auth group,
  handled by the settings controller (where it sits next to
  disconnect-provider). Replaces the OAuth signup link as the
  Connect button's target.
- Auth callbacks moved out of the guest group (still one URL per
  provider, since OAuth apps only register one) and gain a single
  Auth::check() branch that calls connectToCurrentUser().
- connectToCurrentUser() rejects if the provider id already belongs
  to a different user; otherwise sets it on the current user and
  redirects back to settings with a flash message.
2026-05-04 19:22:09 -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 fix: self-host billing bypass, Facebook API metrics migration, X token refresh, and duplicate social accounts 2026-04-15 09:46:18 -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 refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00
GitHubController.php fix: let authenticated users connect Google/GitHub from Settings 2026-05-04 19:22:09 -03:00
GoogleController.php fix: let authenticated users connect Google/GitHub from Settings 2026-05-04 19:22:09 -03:00
InstagramController.php fix: self-host billing bypass, Facebook API metrics migration, X token refresh, and duplicate social accounts 2026-04-15 09:46:18 -03:00
InstagramFacebookController.php refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00
LinkedInController.php feat: implement paginated social accounts table with search functionality and updated UI components 2026-05-02 14:15:41 -03:00
LinkedInPageController.php refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00
MastodonController.php refactor: implement lazy token refreshing and persist Mastodon scopes 2026-05-03 21:58:25 -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 feat: redesign accounts page with multi-account support 2026-04-14 19:48:35 -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: implement paginated social accounts table with search functionality and updated UI components 2026-05-02 14:15:41 -03:00
ThreadsController.php refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00
TikTokController.php fix: self-host billing bypass, Facebook API metrics migration, X token refresh, and duplicate social accounts 2026-04-15 09:46:18 -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 refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00