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

Cookies #29

Open
emilyb7 opened this issue Apr 13, 2017 · 4 comments
Open

Cookies #29

emilyb7 opened this issue Apr 13, 2017 · 4 comments

Comments

@emilyb7
Copy link

emilyb7 commented Apr 13, 2017

I think https://github.com/hapijs/hapi-auth-cookie is more secure that the standard hapi cookies that you are using.

Is there are reason why you didn't use this module? (other than lack of time or whatever...)

@jwld
Copy link
Member

jwld commented Apr 13, 2017

We sorta decided between them for this project. In my mind it was JWT vs. cookies, but then we ended up storing the JWT as a cookie anyway - is it best practice to store JWT cookies using hapi-auth-cookie then?

We've still not fully wrapped our heads round JWTs tbh!

@emilyb7
Copy link
Author

emilyb7 commented Apr 13, 2017

also still wrapping my head around this, but... the hapi auth cookie is automatically encrypted and so is more secure.

Hapi auth cookie is more for authentication (checking if this is a valid user, who is really logged in).

The other cookie might be for other stuff (tracking users, or whatever. cookies are used in lots of different ways.)

Confusingly, you don't need to store JWTs in a cookie at all, there are other ways to store it.

@emilyb7
Copy link
Author

emilyb7 commented Apr 13, 2017

don't take my word for any of this though. sorry, i'm probs not being very helpful! 😬

@jwld
Copy link
Member

jwld commented Apr 13, 2017

No that makes sense, thanks! I'll probably do a bit more reading on this in reading week...

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