Skip to content

Commit

Permalink
Merge branch 'supabase:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiekki4 authored Aug 9, 2024
2 parents 29ecce1 + 4b04327 commit 000f977
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/api/mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ type TOTPObject struct {
}

type EnrollFactorResponse struct {
ID uuid.UUID `json:"id"`
Type string `json:"type"`
FriendlyName string `json:"friendly_name"`
TOTP TOTPObject `json:"totp,omitempty"`
Phone string `json:"phone,omitempty"`
ID uuid.UUID `json:"id"`
Type string `json:"type"`
FriendlyName string `json:"friendly_name"`
TOTP *TOTPObject `json:"totp,omitempty"`
Phone string `json:"phone,omitempty"`
}

type ChallengeFactorParams struct {
Expand Down Expand Up @@ -246,7 +246,7 @@ func (a *API) enrollTOTPFactor(w http.ResponseWriter, r *http.Request, params *E
ID: factor.ID,
Type: models.TOTP,
FriendlyName: factor.FriendlyName,
TOTP: TOTPObject{
TOTP: &TOTPObject{
// See: https://css-tricks.com/probably-dont-base64-svg/
QRCode: buf.String(),
Secret: key.Secret(),
Expand Down

0 comments on commit 000f977

Please sign in to comment.