diff --git a/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt b/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt index 67d72e5..4ac6a60 100644 --- a/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt +++ b/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt @@ -13,7 +13,8 @@ class Sessions::PasswordlessesController < ApplicationController session_record = @user.sessions.create! cookies.signed.permanent[:session_token] = { value: session_record.id, httponly: true } - revoke_tokens; redirect_to(root_path, notice: "Signed in successfully") + revoke_sign_in_tokens + redirect_to(root_path, notice: "Signed in successfully") end def create @@ -36,7 +37,7 @@ class Sessions::PasswordlessesController < ApplicationController UserMailer.with(user: @user).passwordless.deliver_later end - def revoke_tokens + def revoke_sign_in_tokens @user.sign_in_tokens.delete_all end end