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
WIP: Exercise 4 #7
Conversation
Detail: - change apollo-datasource-rest with apollo-datasource - rewrite class Post - update votePost - update schema - add context - update server.js: add JWT, middleware, g-shield - exercise-4.md Completed: For an implemented signup feature. ⭐ For a software-tested signup feature. ⭐ For password validation. ⭐ For unique email address validation. ⭐ For not having security issues according to instructions.
"apollo-datasource-rest": "^0.9.5", | ||
"apollo-datasource": "^0.7.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yiimnta Danke, dass du das geändert hast!
- Removing this.context in PostDatasource - Adding currUser in Context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a suggestion given live in the seminar. So no "Approve" or "Request Changes" here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1 @@ | |||
JWT_SECRET=thecountryroads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ If this stays, you will loose a ⭐ here.
⭐ For not having security issues according to instructions.
You have multiple options:
a) Mock jsonwebtoken
node module in your tests, see our forum our group lichtow: Systems-Development-and-Frameworks/lichtow@6d164b9#diff-45f14d66b6a3b7ed6473601b04ce8c30013d014dfd73e439376d93e9196f93dcR98
b) Use dotenv-flow and commit a non-secret in .env.test
c) Explain in README.md one has to create a .env
file before running the tests.
decoded = {} | ||
}) | ||
|
||
const testContext = () => decoded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check this suggestion from Robert
Thank you very much for your helpful reviews @roschaefer, @MaykAkifovski and @ubiquitousbyte ! We're working through this. 💪 |
We have reviewed this pull request