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

How are you checking for the token? #70

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

How are you checking for the token? #70

NouraldinS opened this issue Apr 25, 2018 · 0 comments

Comments

@NouraldinS
Copy link

const checkToken = ('/login',response){
if(request.headers.cookie){
const obj = cookie.parse(request.headers.cookie);
if(obj.token ){
// console.log(obj);
response.writeHead(302,{'location':'/'})
response.end()
}
} else{
handler.serveFiles('/login.html', response);
}
}

I don't understand how you want this piece of code works, and I'm not seeing you use it anywhere, so I'm commenting it out so the rest can work.

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