hapijs / nes

WebSocket adapter plugin for hapi routes
Other
502 stars 87 forks source link

feat: pass on cookies to auth route #291

Closed jaulz closed 4 years ago

jaulz commented 4 years ago

My use case is that I have a cookie where I store the device id. I would like to access the device id in the authenticate method eventually but currently there is no way to access the cookies.

If you are fine, I will create a test for it.

hueniverse commented 4 years ago

I don't like the idea of passing the raw headers because they are already parsed elsewhere. This adds overhead. But I am also not sure what's the best way to pass in parsed cookies.

Do you require the raw header?

jaulz commented 4 years ago

As a workaround I could also use token instead of direct or do you see any downsides of that approach? Maybe we should add a hint to the docs.

hueniverse commented 4 years ago

Try and token and let me know how that goes.

jaulz commented 4 years ago

Works perfectly. Thanks!

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.