Advertisement
pavelzx

Untitled

Feb 13th, 2019
1,219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Erlang 0.49 KB | None | 0 0
  1. В оригинале
  2. case GuardianSerializer.from_token(claims["sub"]) do
  3.           {:ok, user} ->
  4.             {:ok, assign(socket, :current_user, user)}
  5. Пишу так
  6.     case Guardian.Phoenix.Socket.authenticate(socket, ImconWeb.Guardian, token) do
  7.       {:ok, user} ->
  8.         {:ok, assign(socket, :current_user, user["sub"])}
  9. В итоге ошибка
  10.     ** (UndefinedFunctionError) function Phoenix.Socket.fetch/2 is undefined (Phoenix.Socket does not implement the Access behaviour)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement