Skip to content

Commit

Permalink
fix: Resend SMS when duplicate SMS sign ups are made (supabase#1490)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?

Resends the confirmation on duplicate Phone sign ups which haven't been
confirmed.

Example scenario:

1. User Signs up with phone and password 
  a. User does not verify otp
2. User signs up with phone 
  a. Currently this returns an error instead of re-sending the SMS
  • Loading branch information
J0 authored Mar 22, 2024
1 parent 92f3026 commit 504abbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (a *API) Signup(w http.ResponseWriter, r *http.Request) error {
return terr
}
}
identity, terr := models.FindIdentityByIdAndProvider(tx, user.ID.String(), "email")
identity, terr := models.FindIdentityByIdAndProvider(tx, user.ID.String(), params.Provider)
if terr != nil {
if !models.IsNotFoundError(terr) {
return terr
Expand Down

0 comments on commit 504abbe

Please sign in to comment.