-
Notifications
You must be signed in to change notification settings - Fork 23
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
True2thepen patch 3 #67
base: master
Are you sure you want to change the base?
Conversation
Update general-view.php Remove beta tag.
Update dashboard Add Protect endpoints status
Allow user to use either username or email in username field for /auth endpoint. This is inline with how a user normally logs in to WordPress
This is failing 2 tests. I have yet to discover why. It works on the dev server. I did find during all these failed test that I inadvertently allowed the email field to contain either the username or email. I have since fixed this. Any ideas on why these two tests are failing let me know. |
@nicumicle Use Postman to test. Pass username field with username or email and correct password returns true. Pass incorrect credentials returns false. Pass email field with email and correct password returns true. Pass email field with username and correct password returns false. Pass incorrect credentials returns false. Error output:
/app/simple-jwt-login/src/Services/AuthenticateService.php:119 This test mocks the password to 1234 yet sends a password of 123. Test is supposed to be a successful test.
/app/simple-jwt-login/src/Services/AuthenticateService.php:119 This test mocks a password of 1234, yet sends a password of 123. Test is supposed to be a successful test.ERRORS! |
Found the problem in the tests. When you change the authentication to allow username to contain either the username or the email, you need to account for this in the tests. Which they weren't. Tests are now fixed. |
Issue Link
#19
Types of changes
Description
Added check for username/email in username field on /auth endpoint. This allows user to login in with either username or email in username field as they normally would in WordPress.
How has this been tested?
Tested on dev server running WP 6.1.1 and PHP 8.1
Screenshots (optional)
Checklist:
composer check-plugin
locally