When adding a user via API creating a session token and sending it with the response.

This commit is contained in:
2026-02-18 10:56:16 +01:00
parent 6c41f69723
commit e0b244bd4e
3 changed files with 22 additions and 2 deletions

View File

@ -180,6 +180,13 @@ defmodule BeetRoundServer.Accounts do
|> update_user_and_delete_all_tokens()
end
def create_email_token(%User{} = user) do
{encoded_token, user_token} = UserToken.build_email_token(user, "session")
Repo.insert!(user_token)
encoded_token
end
## Session
@doc """