parse_oauth_referer @referer
append_content_security_policy_directives(
- :form_action => %w[accounts.google.com *.facebook.com login.live.com github.com meta.wikimedia.org]
+ :form_action => %w[accounts.google.com *.facebook.com login.microsoftonline.com github.com meta.wikimedia.org]
)
if current_user
:auth_provider => params[:auth_provider],
:auth_uid => params[:auth_uid])
- flash.now[:notice] = render_to_string :partial => "auth_association"
-
- # validate before displaying to show email field if it conflicts
- flash.now[:notice] = t ".duplicate_social_email" unless current_user.valid? && current_user.errors[:email].empty?
+ if current_user.valid? || current_user.errors[:email].empty?
+ flash.now[:notice] = render_to_string :partial => "auth_association"
+ else
+ flash.now[:warning] = t ".duplicate_social_email"
+ end
else
check_signup_allowed