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

SECRET #18

Open
NouraldinS opened this issue Apr 25, 2018 · 0 comments
Open

SECRET #18

NouraldinS opened this issue Apr 25, 2018 · 0 comments

Comments

@NouraldinS
Copy link

w7-books/src/handler.js

Lines 43 to 56 in 9855b0e

jwt.verify(cookie.token,'inass', (err, token) => {
if(err) {
console.log('error');
} else {
cb( token.username);
}
});
}
const handleUserName = (req,res, endpoint) => {
if (req.headers.cookie) {
const name = parse(req.headers.cookie);
jwt.verify(name.token,'inass', (err, token) => {

inass is not a secret, put it in your config.env and use it as process.env.SECRET @InassTubail

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