Skip to content

Commit

Permalink
feat: add support for TOTP secret (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
faroceann committed Jun 3, 2024
1 parent 709ab52 commit 1d7deff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/usermanagement/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ type EnrollAuthFactorOpts struct {
Type mfa.FactorType `json:"type"`
TOTPIssuer string `json:"totp_issuer,omitempty"`
TOTPUser string `json:"totp_user,omitempty"`
TOTPSecret string `json:"totp_secret,omitempty"`
}

type EnrollAuthFactorResponse struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/usermanagement/usermanagement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ func TestUserManagementEnrollAuthFactor(t *testing.T) {
authenticationRes, err := EnrollAuthFactor(context.Background(), EnrollAuthFactorOpts{
User: "user_01E3JC5F5Z1YJNPGVYWV9SX6GH",
Type: mfa.TOTP,
TOTPSecret: "testSecret",
})

require.NoError(t, err)
Expand Down

0 comments on commit 1d7deff

Please sign in to comment.