mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:11:12 +08:00
FIX: Redirect to provided origin after auth (#12558)
It used to redirect to the destination_url cookie which sometimes is set incorrectly.
This commit is contained in:
@ -34,6 +34,9 @@ class Middleware::OmniauthBypassMiddleware
|
||||
|
||||
# If the user is trying to reconnect to an existing account, store in session
|
||||
request.session[:auth_reconnect] = !!request.params["reconnect"]
|
||||
|
||||
# If the client provided an origin, store in session to redirect back
|
||||
request.session[:destination_url] = request.params["origin"]
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user