Use a 307 Temporary Redirect to redirect to authentication
When the user wants to enable an external authenticator we need to redirect to omniauth but that now needs to be a POST so use a redirect that preserves the POST method. Fixes #3114
This commit is contained in:
parent
ff3a30d245
commit
2233edbcfa
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ class UsersController < ApplicationController
|
||||||
redirect_to user_account_url(current_user) if current_user.errors.count.zero?
|
redirect_to user_account_url(current_user) if current_user.errors.count.zero?
|
||||||
else
|
else
|
||||||
session[:new_user_settings] = params
|
session[:new_user_settings] = params
|
||||||
redirect_to auth_url(params[:user][:auth_provider], params[:user][:auth_uid])
|
redirect_to auth_url(params[:user][:auth_provider], params[:user][:auth_uid]), :status => :temporary_redirect
|
||||||
end
|
end
|
||||||
elsif errors = session.delete(:user_errors)
|
elsif errors = session.delete(:user_errors)
|
||||||
errors.each do |attribute, error|
|
errors.each do |attribute, error|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue