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

Login user error #27

Open
n1c0z opened this issue Aug 24, 2018 · 0 comments
Open

Login user error #27

n1c0z opened this issue Aug 24, 2018 · 0 comments

Comments

@n1c0z
Copy link

n1c0z commented Aug 24, 2018

It seems a non authenticated but existing user is redirected to the same route:

        if (bcrypt.compareSync(password, hashPassword)) {
            req.session.user = JSON.stringify({ username, hashPassword });
            //console.log('Login success')
            res.redirect("/login");
        } else {
            console.log("Bad login");
            res.redirect("/login");
        }
@n1c0z n1c0z changed the title Login user Login user error Aug 24, 2018
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