-
Notifications
You must be signed in to change notification settings - Fork 27
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
ActionCable support? #44
Comments
I haven't tried API Guard with ActionCable. Can you try including below modules and see how it works?
|
Somehow it helped, another error came
|
Can you try calling the method |
It works now! Thanks. |
You can use it. I will try for the possibility to support action cable in API Guard and update here if I found anything. You can close this issue. |
Update: I figued out that its caused by some method from class Auth
extend ApiGuard::JwtAuth::JsonWebToken
end and then to decode token used |
Hey, I'ma tryin to use this gem to auth ActionCable connection, but I cant manage it to work.
I'm kinda fresh user of rails websockets so I dont know if I'm doing all right but I think I do.
Also I'm doing own sort of auth as I made it with #38 to allow guest connections aswell.
on connection.rb I included helper that reads JWT (from cookies or params, doesnt matter here) and I pass it successfully in any possible way but after that I'm getting error.
There was an exception - NameError(undefined local variable or method
decode_token' for #ApplicationCable::Connection:xxxxxxxxxxxx`And I did try include ApiGuard and ApiGuard:JwAuth etc for helper, or for connection.rb, nothing worked
Example code of connection.rb that should work if decode_token would be defined
The text was updated successfully, but these errors were encountered: