hapijs / crumb

CSRF crumb generation and validation for hapi
Other
171 stars 51 forks source link

Undefined crumb value get in jade template #27

Closed mazzy89 closed 10 years ago

mazzy89 commented 10 years ago

I'm using crumb plugin in my project. I haven't set any options. I try to get crumb value in jade template in this way

input(type='hidden', name='crumb', value='#{crumb}')

but the value is undefined. Why? Should I set something?

mazzy89 commented 10 years ago

I have created the example similar to the one in this repository but using jade template. it works like a charm but when I use crumb in in my project something doesn't work. I think it caused by a conflict with any plugins I have installed. These are ones I'm using: tv, good, bell, hapi-auth-cookie, hapi-mongoose-db-connector, crumb

mazzy89 commented 10 years ago

I'm trying to reproduce the problem but without any success.

mazzy89 commented 10 years ago

I got the problem. I have enabled cors true this was the reason why no crumb had been generated

stongo commented 10 years ago

v3.2.0 just released - this adds an allowOrigins option to set the cookie when CORS is enabled

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.