nolancaster / angular2-actioncable

Integrate ActionCable with Angular2+
25 stars 16 forks source link

Passing authentication header #9

Closed deniciocode closed 4 years ago

deniciocode commented 4 years ago

Hey,

I am currently using angular2-actioncable to introduce websocket in our current application. Our backend is a rails api only application. We are looking to a way to authentication. Can we pass headers when we are going to connect to /cable or should we send everything authentication related via params

Best regards

nolancaster commented 4 years ago

Yeah, I just end up passing my access token via params. I'm not sure how feasible it is to allow headers because the ActionCable code is responsible for establishing the websocket connection and I don't see any hook to add headers to that connection request.

deniciocode commented 4 years ago

Same here.