Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
Last active March 27, 2017 10:53
Show Gist options
  • Save samueljmurray/e633b251e43b66c2e91a6ee57e4aa2bc to your computer and use it in GitHub Desktop.
Save samueljmurray/e633b251e43b66c2e91a6ee57e4aa2bc to your computer and use it in GitHub Desktop.
Authorized anon
defp authorized_anon(conn, user_auth) do
conn = Guardian.Plug.api_sign_in(conn, user_auth, :access)
jwt = Guardian.Plug.current_token(conn)
conn
|> put_status(201)
|> render(UserAuthView, "show.json", jwt: jwt)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment