Closed rissicay closed 7 years ago
I'm just guessing, but it seems Phauxth.Token.verify isn't compatible with receiving a socket instead of a connection. The error I am getting is:
Request: GET /socket/websocket?token=fake_token&vsn=2.0.0 (exit) an exception was raised: (ArgumentError) argument error :erlang.apply(%Phoenix.Socket{assigns: %{}, channel: nil, channel_pid: nil, endpoint: Test.Endpoint, handler: Test.UserSocket, id: nil, join_ref: nil, joined: false, private: %{}, pubsub_server: Reddlst.PubSub, ref: nil, serializer: Phoenix.Transports.V2.WebSocketSerializer, topic: nil, transport: Phoenix.Transports.WebSocket, transport_name: :websocket, transport_pid: #PID<0.6284.0>, vsn: "2.0.0"}, :config, []) (phauxth) lib/phauxth/token.ex:74: Phauxth.Token.get_key_base/1
What do you think about adding support for socket to Phauxth.Token. Phoenix.Token has done it https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/token.ex
Pull request here: https://github.com/riverrun/phauxth/pull/25
Thanks for reporting this issue.
I'll look at it later today.
currently works on master.
Great! I'll update the hex package now.
I'm just guessing, but it seems Phauxth.Token.verify isn't compatible with receiving a socket instead of a connection. The error I am getting is:
Request: GET /socket/websocket?token=fake_token&vsn=2.0.0 (exit) an exception was raised: (ArgumentError) argument error :erlang.apply(%Phoenix.Socket{assigns: %{}, channel: nil, channel_pid: nil, endpoint: Test.Endpoint, handler: Test.UserSocket, id: nil, join_ref: nil, joined: false, private: %{}, pubsub_server: Reddlst.PubSub, ref: nil, serializer: Phoenix.Transports.V2.WebSocketSerializer, topic: nil, transport: Phoenix.Transports.WebSocket, transport_name: :websocket, transport_pid: #PID<0.6284.0>, vsn: "2.0.0"}, :config, []) (phauxth) lib/phauxth/token.ex:74: Phauxth.Token.get_key_base/1
What do you think about adding support for socket to Phauxth.Token. Phoenix.Token has done it https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/token.ex