Skip to content

Instantly share code, notes, and snippets.

defmodule MyApp.Auth do
import Comeonin.Bcrypt, only: [checkpw: 2, dummy_checkpw: 0]
alias MyApp.Accounts.User
alias MyApp.Repo
def login(conn, user) do
conn
|> Guardian.Plug.sign_in(user)
end