Renew Rails session ID on successful registration

rebase/4.0.0rc2
Claire 2022-01-24 21:52:45 +01:00
parent 3f6a36168f
commit 6a2f248fe4
1 changed files with 5 additions and 0 deletions

View File

@ -141,6 +141,11 @@ class Auth::RegistrationsController < Devise::RegistrationsController
def sign_up(resource_name, resource)
clear_captcha!
old_session_values = session.to_hash
reset_session
session.update old_session_values.except('session_id')
super
end