Update authentication method

This commit is contained in:
2023-11-18 18:20:29 +11:00
parent 9d9ffc9122
commit 3b3ad66ba3
24 changed files with 273 additions and 25 deletions

View File

@@ -0,0 +1,17 @@
module Admin
module Commands
module Sessions
class Validate
include Deps["repos.login_tokens_repo"]
def call(token:)
user_id = login_tokens_repo.by_token(token: token).user_id
if user_id
login_tokens_repo.delete_all
user_id
end
end
end
end
end
end