Fix token decoding
This commit is contained in:
parent
c28ef2466c
commit
fe334be118
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ defmodule ComfycampWeb.UserAuth do
|
||||||
def fetch_bearer_token(conn, _opts) do
|
def fetch_bearer_token(conn, _opts) do
|
||||||
case Plug.Conn.get_req_header(conn, "authorization") do
|
case Plug.Conn.get_req_header(conn, "authorization") do
|
||||||
["Bearer " <> b64token] ->
|
["Bearer " <> b64token] ->
|
||||||
token = Base.decode64(b64token)
|
token = Base.url_decode64(b64token)
|
||||||
user = Accounts.get_user_by_bearer_token(token)
|
user = Accounts.get_user_by_bearer_token(token)
|
||||||
assign(conn, :oauth_user, user)
|
assign(conn, :oauth_user, user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue