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

Add nodejs Session Store example #5

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Removed default users.
johnhorsema committed Jun 26, 2020
commit ce19c251e83d6b66565ac158b9132f91f857dd82
11 changes: 1 addition & 10 deletions examples/nodejs/basic_auth/index.ts
Original file line number Diff line number Diff line change
@@ -7,16 +7,7 @@ import bcrypt from "bcryptjs";
const salt = bcrypt.genSaltSync(10);
const session = new SessionStore(new Memory());

const users = [
{
id: "john",
password: "123"
},
{
id: "mary",
password: "456"
}
]
const users = []

const authenticate = (id: string, password: string) => {
return users.find(u => u.id === id)