Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- В оригинале
- case GuardianSerializer.from_token(claims["sub"]) do
- {:ok, user} ->
- {:ok, assign(socket, :current_user, user)}
- Пишу так
- case Guardian.Phoenix.Socket.authenticate(socket, ImconWeb.Guardian, token) do
- {:ok, user} ->
- {:ok, assign(socket, :current_user, user["sub"])}
- В итоге ошибка
- ** (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