discourse/app/controllers/users
Régis Hanol ced043be3c
FIX: 'destination_url' cookie handling (#33072)
Since the introduction of dedicated login and signup pages (as opposed
to modals), we've been seeing reports of issues where visitors aren't
redirected back to the "page" they were at when they initiated the
_authentication_ process.

Since we have a bazillion of ways a user might authenticate
(credentials, social logins, SSO, passkeys, discourse connect, etc...),
it's really hard to know what a change will impact.

The goal of this PR is to "simplify" the way we handle this "redirection
back to origin" by leveraging the use of a single `destination_url`
cookie set on the client-side.

The changes remove scattered cookie-setting code and consolidate the redirection logic to ensure users are properly redirected back to their original page after authentication.

- Centralized destination URL cookie management in routes and authentication flows
- Removed manual cookie setting from various components in favor of automatic handling
- Updated test scenarios to properly test the new redirection behavior
2025-08-06 10:09:01 +02:00
..
associate_accounts_controller.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
discourse_id_controller.rb DEV: Add Discourse ID authenticator (#33186) 2025-06-17 09:47:00 -04:00
omniauth_callbacks_controller.rb FIX: 'destination_url' cookie handling (#33072) 2025-08-06 10:09:01 +02:00