jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.69k stars 95 forks source link

Set error status in verification request response #177

Closed janko closed 2 years ago

janko commented 2 years ago

When attempting to login to an unverified account, it causes the form for resending verification email was displayed, and currently the response status is 200 OK. This was probably unintentional, because Rodauth generally uses 4xx status codes to render error responses.

So, we change this response to use a 4xx status code as well. This improves compatibility with Turbo, which expects form submits to either redirect or return a non-2xx status code.

jeremyevans commented 2 years ago

Thanks for the patch. I agree we should provide an error code in this case. I'll merge and test shortly.