trypost/app/Http/Controllers
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
..
Api feat: add multipart media upload endpoint and split URL flow 2026-05-04 18:00:03 -03:00
App fix: let authenticated users connect Google/GitHub from Settings 2026-05-04 19:22:09 -03:00
Auth fix: let authenticated users connect Google/GitHub from Settings 2026-05-04 19:22:09 -03:00
Controller.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00