[go: nahoru, domu]

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(auth): Add TotpInfo field to UserRecord #2197

Merged
merged 9 commits into from
Jun 27, 2023
Merged

Conversation

pragatimodi
Copy link
Contributor
@pragatimodi pragatimodi commented May 26, 2023

Adding a TotpInfo field to UserRecord for Admin users to view a user's MFA configuration. TOTP enrollment for users is enabled via client SDKs only.
Testing was done by manually enrolling a user on TOTP using curl and creating a test app to get the corresponding user's UserRecord configuration
Manual testing output:

MultiFactorSettings {
  enrolledFactors: [
    TotpMultiFactorInfo {
      uid: 'bd8fa8e0-194c-443e-82e9-77b39868aed7',
      factorId: 'totp',
      displayName: 'enroll-totp-test',
      enrollmentTime: 'Wed, 31 May 2023 20:39:18 GMT',
      totpInfo: {}
    }
  ]
}

@pragatimodi pragatimodi marked this pull request as ready for review May 30, 2023 21:33
@pragatimodi pragatimodi requested a review from prameshj May 30, 2023 23:09
test/unit/auth/user-record.spec.ts Show resolved Hide resolved
src/auth/user-record.ts Outdated Show resolved Hide resolved
src/auth/user-record.ts Show resolved Hide resolved
Copy link
@prameshj prameshj left a comment

Choose a reason for hiding this comment

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

Can you update the PR description to describe the change and also include the manual testing done? Thanks!

src/auth/user-record.ts Show resolved Hide resolved
src/auth/user-record.ts Show resolved Hide resolved
@pragatimodi pragatimodi force-pushed the totp-user-record branch 2 times, most recently from fd542b0 to fa82293 Compare May 31, 2023 03:55
package.json Outdated Show resolved Hide resolved
Copy link
@prameshj prameshj left a comment

Choose a reason for hiding this comment

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

Can you leave a snippet of the user record output in the PR description? Thanks!

Copy link
Contributor
@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Choose a reason for hiding this comment

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

LGTM

src/auth/user-record.ts Show resolved Hide resolved
Copy link
Contributor
@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Choose a reason for hiding this comment

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

LGTM

@lahirumaramba lahirumaramba changed the title Adding TotpInfo to userRecord feat(auth): Add TotpInfo field to UserRecord Jun 2, 2023
Copy link
Member
@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM!

@pragatimodi pragatimodi merged commit f182c36 into master Jun 27, 2023
5 checks passed
@pragatimodi pragatimodi deleted the totp-user-record branch June 27, 2023 18:47
kevinthecheung pushed a commit that referenced this pull request Jun 27, 2023
* Adding TotpInfo to userRecord

* Changing type from `any` to `unknown` for type safety.

* Addressing feedback
kevinthecheung added a commit that referenced this pull request Jun 27, 2023
* Fixes to password policy validation

* add test

* feat(auth): Add `TotpInfo` field to `UserRecord` (#2197)

* Adding TotpInfo to userRecord

* Changing type from `any` to `unknown` for type safety.

* Addressing feedback

---------

Co-authored-by: pragatimodi <110490169+pragatimodi@users.noreply.github.com>
@lahirumaramba lahirumaramba changed the title feat(auth): Add TotpInfo field to UserRecord fix(auth): Add TotpInfo field to UserRecord Jul 10, 2023
lahirumaramba added a commit that referenced this pull request Jul 12, 2023
lahirumaramba added a commit that referenced this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants