pavelzx

Untitled

Feb 13th, 2019
651
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×