Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Oct 30, 2024
1 parent 49fcbd6 commit f9d0459
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit f9d0459

Please sign in to comment.