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

validate function not doing anything #16

Open
mattlub opened this issue Apr 13, 2017 · 0 comments
Open

validate function not doing anything #16

mattlub opened this issue Apr 13, 2017 · 0 comments

Comments

@mattlub
Copy link
Member

mattlub commented Apr 13, 2017

https://github.com/FACN1/week8-edjy/blob/master/src/server.js#L26-L30

I believe that the validate function is only run if the token has been verified as having your signature (this is due to hapi-auth-jwt2 authenticating under the hood), so I think token will always exist. i.e. the "if (!token)" branch won't run.

The validate function could do some checks on the info in the token, e.g. check who the user is or something similar.

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

1 participant