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

fix: improve mfa verify logs #1635

Merged
merged 3 commits into from
Jun 26, 2024
Merged

fix: improve mfa verify logs #1635

merged 3 commits into from
Jun 26, 2024

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • Upgrade the totp library to the latest version
  • Improve logging when mfa verification fails by returning the validation error internally as well as logging the code used

@kangmingtay kangmingtay requested a review from a team as a code owner June 25, 2024 03:03
@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9655757406

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 57.688%

Totals Coverage Status
Change from base Build 9648353678: 0.01%
Covered Lines: 8704
Relevant Lines: 15088

💛 - Coveralls

@kangmingtay
Copy link
Member Author

@J0 decided not to add the error to the hook input since it doesn't seem to help with the decision around re-verification

Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The only concern I have is that revealing the code in the Invalid TOTP code... may make it easier to guess since wrong / mis-typed codes can bear some similarity to the actual code.

Let's seek a secondary opinion from @hf

Otherwise looks good to me. Thanks for putting this together

internal/api/mfa.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 26, 2024

Pull Request Test Coverage Report for Build 9677521071

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 57.688%

Totals Coverage Status
Change from base Build 9648353678: 0.01%
Covered Lines: 8704
Relevant Lines: 15088

💛 - Coveralls

@kangmingtay kangmingtay merged commit d8b47f9 into master Jun 26, 2024
2 checks passed
@kangmingtay kangmingtay deleted the km/improve-mfa-verify-logs branch June 26, 2024 10:03
J0 pushed a commit that referenced this pull request Jul 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.155.0](v2.154.2...v2.155.0)
(2024-07-03)


### Features

* add `password_hash` and `id` fields to admin create user
([#1641](#1641))
([20d59f1](20d59f1))


### Bug Fixes

* improve mfa verify logs
([#1635](#1635))
([d8b47f9](d8b47f9))
* invited users should have a temporary password generated
([#1644](#1644))
([3f70d9d](3f70d9d))
* upgrade golang-jwt to v5
([#1639](#1639))
([2cb97f0](2cb97f0))
* use pointer for `user.EncryptedPassword`
([#1637](#1637))
([bbecbd6](bbecbd6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?
* Upgrade the totp library to the latest version
* Improve logging when mfa verification fails by returning the
validation error internally as well as logging the code used
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.155.0](supabase/auth@v2.154.2...v2.155.0)
(2024-07-03)


### Features

* add `password_hash` and `id` fields to admin create user
([supabase#1641](supabase#1641))
([20d59f1](supabase@20d59f1))


### Bug Fixes

* improve mfa verify logs
([supabase#1635](supabase#1635))
([d8b47f9](supabase@d8b47f9))
* invited users should have a temporary password generated
([supabase#1644](supabase#1644))
([3f70d9d](supabase@3f70d9d))
* upgrade golang-jwt to v5
([supabase#1639](supabase#1639))
([2cb97f0](supabase@2cb97f0))
* use pointer for `user.EncryptedPassword`
([supabase#1637](supabase#1637))
([bbecbd6](supabase@bbecbd6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?
* Upgrade the totp library to the latest version
* Improve logging when mfa verification fails by returning the
validation error internally as well as logging the code used
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.155.0](supabase/auth@v2.154.2...v2.155.0)
(2024-07-03)


### Features

* add `password_hash` and `id` fields to admin create user
([supabase#1641](supabase#1641))
([20d59f1](supabase@20d59f1))


### Bug Fixes

* improve mfa verify logs
([supabase#1635](supabase#1635))
([d8b47f9](supabase@d8b47f9))
* invited users should have a temporary password generated
([supabase#1644](supabase#1644))
([3f70d9d](supabase@3f70d9d))
* upgrade golang-jwt to v5
([supabase#1639](supabase#1639))
([2cb97f0](supabase@2cb97f0))
* use pointer for `user.EncryptedPassword`
([supabase#1637](supabase#1637))
([bbecbd6](supabase@bbecbd6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants