From 73240a0b096977703e3c7d24a224b5641ce47c81 Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Fri, 22 Mar 2024 22:54:40 +0700 Subject: [PATCH] fix: Resend SMS when duplicate SMS sign ups are made (#1490) ## 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 --- internal/api/signup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/signup.go b/internal/api/signup.go index 5c7e588b8e..a173236875 100644 --- a/internal/api/signup.go +++ b/internal/api/signup.go @@ -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