From d6f96b19a6fafc0249b6b8a8f9e86a7d5ed9157a Mon Sep 17 00:00:00 2001 From: akash Date: Mon, 16 Feb 2026 00:37:08 +0530 Subject: [PATCH 1/3] fix(auth): improve verify error message when token missing email or phone --- internal/api/verify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/verify.go b/internal/api/verify.go index 212d7388eb..1714a9b1ad 100644 --- a/internal/api/verify.go +++ b/internal/api/verify.go @@ -78,7 +78,7 @@ func (p *VerifyParams) Validate(r *http.Request, a *API) error { } p.TokenHash = crypto.GenerateTokenHash(p.Email, p.Token) } else { - return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "Only an email address or phone number should be provided on verify") + return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "When verifying with a token, you must provide either email address or phone no") } } else if p.TokenHash != "" { if p.Email != "" || p.Phone != "" || p.RedirectTo != "" { From f90b09657353b492f3f48560f75e71ccdd4b06ce Mon Sep 17 00:00:00 2001 From: akash Date: Mon, 16 Feb 2026 00:57:10 +0530 Subject: [PATCH 2/3] changed no to number --- internal/api/verify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/verify.go b/internal/api/verify.go index 1714a9b1ad..949135ef79 100644 --- a/internal/api/verify.go +++ b/internal/api/verify.go @@ -78,7 +78,7 @@ func (p *VerifyParams) Validate(r *http.Request, a *API) error { } p.TokenHash = crypto.GenerateTokenHash(p.Email, p.Token) } else { - return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "When verifying with a token, you must provide either email address or phone no") + return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "When verifying with a token, you must provide either email address or phone number") } } else if p.TokenHash != "" { if p.Email != "" || p.Phone != "" || p.RedirectTo != "" { From 7ad94bf306e794a62d6a504f396314342e175e95 Mon Sep 17 00:00:00 2001 From: akash Date: Mon, 16 Feb 2026 00:59:55 +0530 Subject: [PATCH 3/3] fixed gramaticall error --- internal/api/verify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/verify.go b/internal/api/verify.go index 949135ef79..d865d4cd79 100644 --- a/internal/api/verify.go +++ b/internal/api/verify.go @@ -78,7 +78,7 @@ func (p *VerifyParams) Validate(r *http.Request, a *API) error { } p.TokenHash = crypto.GenerateTokenHash(p.Email, p.Token) } else { - return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "When verifying with a token, you must provide either email address or phone number") + return apierrors.NewBadRequestError(apierrors.ErrorCodeValidationFailed, "When verifying with a token, you must provide either an email address or a phone number") } } else if p.TokenHash != "" { if p.Email != "" || p.Phone != "" || p.RedirectTo != "" {