mirror of
https://github.com/discourse/discourse.git
synced 2025-08-17 18:04:11 +08:00
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 |
||
---|---|---|
.. | ||
auth_provider.rb | ||
authenticator.rb | ||
current_user_provider.rb | ||
default_current_user_provider.rb | ||
discord_authenticator.rb | ||
discourse_id_authenticator.rb | ||
facebook_authenticator.rb | ||
github_authenticator.rb | ||
google_oauth2_authenticator.rb | ||
linkedin_oidc_authenticator.rb | ||
managed_authenticator.rb | ||
oauth_faraday_formatter.rb | ||
result.rb | ||
twitter_authenticator.rb |