-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feat/middleware #36
base: master
Are you sure you want to change the base?
Feat/middleware #36
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/storyofams/next-password-protect/5DZY4ph3wXxeso5LRC933GKam9Vp [Deployment for bdbfe9e failed] |
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 11 +4
Lines 123 172 +49
Branches 47 68 +21
=========================================
+ Hits 123 172 +49
Continue to review full report at Codecov.
|
Looks good, why no merge? |
// jest | ||
// .spyOn(api, 'PasswordChecker') | ||
// .mockImplementationOnce(() => ({ check } as any)); |
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.
Commented code should not be pushed to Github.
Implement the password checking using Next middleware.
Also exports the password checking logic in a separate class PasswordChecker, so it can be used on its own.
Closes #25