Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bvasilenko
Copy link
Contributor

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.

@bvasilenko bvasilenko requested a review from a team as a code owner October 16, 2024 05:46
@bvasilenko bvasilenko requested review from RehanY147 and removed request for a team October 16, 2024 05:46
@bugclerk bugclerk changed the title NAS-131213: Skip two-factor check on first login NAS-131213 / 25.04 / Skip two-factor check on first login Oct 16, 2024
@bugclerk
Copy link
Contributor

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.97%. Comparing base (583373f) to head (ec56e1d).
Report is 19 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@bvasilenko
Copy link
Contributor Author

@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

Copy link
Contributor

@RehanY147 RehanY147 left a 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

@bvasilenko bvasilenko changed the title NAS-131213 / 25.04 / Skip two-factor check on first login NAS-131213 / 25.04 / Refactor out auth.two_factor_auth Oct 18, 2024
Copy link
Contributor

@RehanY147 RehanY147 left a 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?
image

);
}),
const payload: LoginExQuery = otp
? { mechanism: 'OTP_TOKEN', otp_token: otp }
Copy link
Contributor

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

@undsoft
Copy link
Collaborator

undsoft commented Oct 21, 2024

Discussed the issue Rehan discovered with Andrew. Middleware will make some adjustments and we'd have to revisit this once those changes are done.

@anodos325
Copy link
Contributor

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?
image

@anodos325 anodos325 closed this Oct 21, 2024
@anodos325 anodos325 reopened this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants