firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.12k stars 239 forks source link

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

Closed pragatimodi closed 11 months ago

pragatimodi commented 1 year ago

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:

{
  "MultiFactor": {
    "EnrolledFactors": [
      {
        "UID": "d3dc0070-665b-42e1-b3ec-18f98af224fb",
        "DisplayName": "totp-enroll-test",
        "EnrollmentTimestamp": 1685671931000,
        "FactorID": "totp",
        "PhoneMultiFactorInfo": null,
        "TOTPMultiFactorInfo": {}
      }
    ]
  }
}
lahirumaramba commented 12 months ago

Please rebase this to use the dev branch as the base. Thank you!

pragatimodi commented 11 months ago

Moving this to https://github.com/firebase/firebase-admin-go/pull/573 as per offline sync with @lahirumaramba to base it off dev branch. Closing this PR.