Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting errors when passing a socket to Phauxth.Token.verify #24

Closed
rissicay opened this issue Aug 27, 2017 · 4 comments
Closed

Getting errors when passing a socket to Phauxth.Token.verify #24

rissicay opened this issue Aug 27, 2017 · 4 comments

Comments

@rissicay
Copy link

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

@rissicay
Copy link
Author

Pull request here: #25

@riverrun
Copy link
Owner

Thanks for reporting this issue.

I'll look at it later today.

@rissicay
Copy link
Author

currently works on master.

@riverrun
Copy link
Owner

Great! I'll update the hex package now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants