@@ -150,28 +150,28 @@ await _mailService.TrySendEmailAsync(_logger,
150150
151151 if ( user == null )
152152 {
153- return ( false , "Invalid verification link" ) ;
153+ return ( false , "This verification link is invalid. Please check the link or request a new one. " ) ;
154154 }
155155
156156 if ( user . EmailVerified )
157157 {
158- return ( false , "Email already verified" ) ;
158+ return ( false , "Your email address has already been verified. You can log in now. " ) ;
159159 }
160160
161161 if ( user . EmailVerificationExpiresAt == null || user . EmailVerificationExpiresAt < DateTime . UtcNow )
162162 {
163- return ( false , "Verification link expired" ) ;
163+ return ( false , "This verification link has expired. Please register again to receive a new link. " ) ;
164164 }
165165
166166 if ( string . IsNullOrEmpty ( user . EmailVerificationTokenHash ) )
167167 {
168- return ( false , "Invalid verification token " ) ;
168+ return ( false , "This verification link is invalid or has already been used. " ) ;
169169 }
170170
171171 // Verify token by hashing and comparing
172172 if ( ! BCrypt . Net . BCrypt . Verify ( token , user . EmailVerificationTokenHash ) )
173173 {
174- return ( false , "Invalid verification token " ) ;
174+ return ( false , "This verification link is invalid or has already been used. " ) ;
175175 }
176176
177177 // Mark as verified
@@ -263,25 +263,25 @@ await _mailService.TrySendEmailAsync(_logger,
263263 . FirstOrDefaultAsync ( u => u . Email == request . Email . ToLowerInvariant ( ) ) ;
264264
265265 if ( user == null )
266- return ( false , "Invalid password reset link" ) ;
266+ return ( false , "This password reset link is invalid. Please request a new one. " ) ;
267267
268268 if ( user . AuthType != "email" )
269- return ( false , "Password reset is only available for email accounts" ) ;
269+ return ( false , "Password reset is only available for email/password accounts. You signed up with a social login. " ) ;
270270
271271 if ( string . IsNullOrEmpty ( user . PasswordResetTokenHash ) )
272272 {
273- return ( false , "No password reset requested" ) ;
273+ return ( false , "No password reset was requested for this account. Please request a new reset link. " ) ;
274274 }
275275
276276 if ( user . PasswordResetExpires == null || user . PasswordResetExpires < DateTime . UtcNow )
277277 {
278- return ( false , "Password reset link expired" ) ;
278+ return ( false , "This password reset link has expired. Please request a new one. " ) ;
279279 }
280280
281281 // Verify token by hashing and comparing
282282 if ( ! BCrypt . Net . BCrypt . Verify ( request . Token , user . PasswordResetTokenHash ) )
283283 {
284- return ( false , "Invalid password reset token " ) ;
284+ return ( false , "This password reset link is invalid or has already been used. " ) ;
285285 }
286286
287287 // Hash new password
@@ -348,7 +348,7 @@ await _mailService.TrySendEmailAsync(_logger,
348348 // Validate user exists and uses email auth
349349 if ( user == null || user . AuthType != "email" )
350350 {
351- return ( false , null , "Invalid email or password" ) ;
351+ return ( false , null , "The email or password you entered is incorrect. " ) ;
352352 }
353353
354354 // Verify password
@@ -374,13 +374,13 @@ await _mailService.TrySendEmailAsync(_logger,
374374 _logger . LogWarning ( "Failed login attempt for user: {Email} (attempt {Count}/{Max})" ,
375375 user . Email , user . FailedLoginAttempts , _config . Auth . MaxFailedLoginAttempts ) ;
376376
377- return ( false , null , "Invalid email or password" ) ;
377+ return ( false , null , "The email or password you entered is incorrect. " ) ;
378378 }
379379
380380 // Check if email is verified
381381 if ( ! user . EmailVerified )
382382 {
383- return ( false , null , "Please verify your email address before logging in" ) ;
383+ return ( false , null , "Please verify your email address before logging in. Check your inbox for the verification link. " ) ;
384384 }
385385
386386 // Success - reset failed attempts and update last login
0 commit comments