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

.env file with session_token required #55

Open
Avataw opened this issue May 15, 2022 · 7 comments
Open

.env file with session_token required #55

Avataw opened this issue May 15, 2022 · 7 comments

Comments

@Avataw
Copy link

Avataw commented May 15, 2022

It's trivial but after running the installation steps in the readme e.g:

git clone https://github.com/redwoodjs/redwood-tutorial
cd redwood-tutorial
yarn install
yarn rw prisma migrate dev
yarn rw dev

I was not able to sign up or login - it failed with 500s
image

The console I ran yarn rw dev with does show an appropriate message

api | 13:57:13 🚨 NoSessionSecretError dbAuth requires a SESSION_SECRET environment variable that is used to encrypt session cookies. Use `yarn rw g secret` to create one, then add to your `.env` file. DO NOT check this variable in your version control system!! 

I would suggest one of the following options:
A) mention in the README that the .env file with a user created session_secret is required to run it out of the box
B) properly show an error toast when the signup or login button have 500s

@Avataw
Copy link
Author

Avataw commented May 15, 2022

Ah I see - the Tutorial does mention this exact thing.
So I would instead suggest changing the link in the Readme:

tutorial itself -> tutorial itself

The new link (https://redwoodjs.com/docs/tutorial/intermission#using-the-example-repo-recommended)
dives exactly into this issue and how to run this project.

@thedavidprice
Copy link
Contributor

@Avataw Agreed! Would you mind opening a PR to resolve this with the steps you outline above?

@Avataw
Copy link
Author

Avataw commented May 29, 2022

Awesome - I will create a PR :) feel free to assign me ~

@lobosan
Copy link

lobosan commented Nov 15, 2022

any updates? I just went through this issue

@cannikin
Copy link
Member

The tutorial has been updated to include this step for quite a while now:

image

Is there something else you think we could do to help alleviate this hiccup, @lobosan ?

@lobosan
Copy link

lobosan commented Nov 16, 2022

in the Readme.md of this repo that instruction is missing, also the packages are not up to date, and I'm seeing issues with the order of imports

@dthyresson
Copy link
Collaborator

Hi @lobosan could you to submit a PR to add the line to generate the secret in the README?

Perhaps as part of that you might be able to link the project and have the imports be reordered?

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

5 participants