mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: redirect to original URL after social login
This commit is contained in:
@ -4,7 +4,7 @@ class Auth::Result
|
||||
:awaiting_approval, :authenticated, :authenticator_name,
|
||||
:requires_invite, :not_allowed_from_ip_address,
|
||||
:admin_not_allowed_from_ip_address, :omit_username,
|
||||
:skip_email_validation
|
||||
:skip_email_validation, :destination_url
|
||||
|
||||
attr_accessor(
|
||||
:failed,
|
||||
@ -42,13 +42,15 @@ class Auth::Result
|
||||
date: I18n.l(user.suspended_till, format: :date_only), reason: user.suspend_reason)
|
||||
}
|
||||
else
|
||||
{
|
||||
result = {
|
||||
authenticated: !!authenticated,
|
||||
awaiting_activation: !!awaiting_activation,
|
||||
awaiting_approval: !!awaiting_approval,
|
||||
not_allowed_from_ip_address: !!not_allowed_from_ip_address,
|
||||
admin_not_allowed_from_ip_address: !!admin_not_allowed_from_ip_address
|
||||
}
|
||||
result[:destination_url] = destination_url if authenticated && destination_url.present?
|
||||
result
|
||||
end
|
||||
else
|
||||
result = { email: email,
|
||||
|
Reference in New Issue
Block a user