Fix race condition in magic link token verification and typo in auth error message
- Hold SELECT FOR UPDATE lock within transaction by using tx directly instead of separate WithConn, ensuring mutual exclusion when multiple requests race to verify the same token - Fix "resouce" → "resource" typo in authentication error messages Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -37,7 +37,7 @@ func NewIdentityPresenceMiddleware() func(next http.Handler) http.Handler {
|
||||
Errors: gqlerror.List{
|
||||
gqlutils.Unauthenticatedf(
|
||||
r.Context(),
|
||||
"authentication is required to access this resouce",
|
||||
"authentication is required to access this resource",
|
||||
),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user