-
Notifications
You must be signed in to change notification settings - Fork 305
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
NAS-131213 / 25.04 / Refactor out auth.two_factor_auth
#10873
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10873 +/- ##
==========================================
+ Coverage 81.92% 81.97% +0.05%
==========================================
Files 1594 1604 +10
Lines 55589 61191 +5602
Branches 5816 7246 +1430
==========================================
+ Hits 45540 50161 +4621
- Misses 10049 11030 +981 ☔ View full report in Codecov by Sentry. |
@RehanY147 it turned out that I need to work more on this one. please reject, so I could request a re-review once I'm done |
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.
Waiting for more changes
e0991ae
to
ec56e1d
Compare
auth.two_factor_auth
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.
Follow these steps
- Setup 2FA for user
- Go to login page
- Enter username/password and click the login button. The 2FA input will show up
- Click Cancel to go back to the original login page
- Enter username and password again and click 'Login'
You will see the following error shown in the screenshot
Expect:
User can login with new credentials
Actual:
User is shown an error about login in progress?
); | ||
}), | ||
const payload: LoginExQuery = otp | ||
? { mechanism: 'OTP_TOKEN', otp_token: otp } |
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.
mechanism
value should be an enum
Discussed the issue Rehan discovered with Andrew. Middleware will make some adjustments and we'd have to revisit this once those changes are done. |
Changes:
Refactoring for login page
Testing:
Test logging in using both regular credentials and 2FA , and number of calls should be less than it was before.