Tell us what’s happening:
I’m not able to pass the Session and session secret should be correctly set up
test.
Your project link(s)
Challenge: Set up Passport
Link to the challenge:
Tell us what’s happening:
I’m not able to pass the Session and session secret should be correctly set up
test.
Your project link(s)
Challenge: Set up Passport
Link to the challenge:
Have you created a “.env” file and given a value for “SESSION_SECRET” as mentioned in the challenge description
To set up your express app to use the session we’ll define just a few basic options. Be sure to add ‘SESSION_SECRET’ to your .env file and give it a random value. This is used to compute the hash used to encrypt your cookie!
At replit
we can’t create .env
file so I’ve added it to secrets
If you are using replit ,you will see an icon like padlock on the top left,add your key and value there, since in replit you will not create .env file
Thank you for the information, but as you could see my message above that I’ve already did the same.
Fine, no problem, I think didn’t see
Apparently the test is hardcoded to look for process.env.SESSION_SECRET
so try that instead of process.env['SESSION_SECRET']
.
Thanks a lot buddy, it worked.
But I think they should mention such points in the docs.
@Kundan28 Or the regex should be fixed to allow for bracket notation. But yes, if that specific string is required it should be mentioned if nothing else.
Yeah, I totally agree with you.
Hello lasjorg… I am having same problem since yesterday about this error.
I tried process.env.SESSION_SECRET
But it aint working
https://replit.com/@Aaeric/boilerplate-advancednode-1#server.js
I also tried inserting the mySecret variable to the secret value.
@Secahl It would be better if you opened your own thread.
Anyway, not sure if you fixed it, but your code is passing for me.
sorry lasjorg…
ok i am creating new one.
Is it not passing for you?
That code was from freecodecamp solution.
OK…not really sure what to do with that information. Anyway, if you still need help please open a new thread with your question. Thank you.
ok… i opened a new one.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.