require uuid for password reset, destroy token after each try

This commit is contained in:
jomo
2016-05-08 19:04:16 +02:00
parent 1f51e9d823
commit 37cccdff18
2 changed files with 30 additions and 17 deletions

View File

@@ -5,6 +5,10 @@
<p>Luckily for you, you can reset your password. Please use the command <code>/gettoken &lt;your email address&gt;</code>, then fill in the form below:</p>
<%= form_tag reset_password_users_path do |f| %>
<table>
<tr>
<td><%= label_tag :ign, "Minecraft name" %></td>
<td><%= text_field_tag :ign, nil, placeholder: "Steve", pattern: "[a-zA-Z0-9_]{2,16}", required: true, title: "Your IGN" %></td>
</tr>
<tr>
<td><%= label_tag :email %></td>
<td><%= text_field_tag :email, nil, placeholder: "steve@example.com", required: true, pattern: ".+@.+", title: "enter valid email address", "x-moz-errormessage" => "enter valid email address" %></td>