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

Demo app #1

Open
jakern opened this issue Oct 3, 2021 · 1 comment
Open

Demo app #1

jakern opened this issue Oct 3, 2021 · 1 comment

Comments

@jakern
Copy link

jakern commented Oct 3, 2021

Do you have any interest in building a demo app to show off all the features of express-user-manager? I gave it a shot this weekend and couldn't get past how though req.session.user is set in the login handler, that user data isn't available when I make the next call, in the loggedIn and authorized middleware.

Here is my repo if seeing it would help. I'm just using httpie to make the requests for now.

Any help would be appreciated. Thanks for such a handy tool.

@simplymichael
Copy link
Owner

simplymichael commented Oct 14, 2021

Hi @jakern , definitely, that would be great.

I have taken a look at your code. Everything looks okay, with just one exception. The codebase is missing a .env file. What you have instead is an ENV file with export-ed values. What you need, however, is a .env file. pronounced dotenv. You also have to remove the export keywords in front of the environment variables defined inside the file. Here's an example of (the contents of) such a file:

# Filename: .env

DB_ADAPTER="sequelize"
SESSION_SECRET="Iamagreatsecret"
PASSWORD_MIN_LENGTH=8
PASSWORD_MAX_LENGTH=32
AUTH_TOKEN_SECRET="THIsistotallyabettersecret"
AUTH_TOKEN_EXPIRY="3600"

I hope this helps.

P.S. Sorry it took this long to respond. I had been occupied in the past few days.

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

2 participants