authentication-zero 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt +3 -2
- data/lib/generators/authentication/templates/controllers/html/password_resets_controller.rb.tt +2 -1
- data/lib/generators/authentication/templates/mailers/password_mailer.rb.tt +1 -1
- data/lib/generators/authentication/templates/views/cancellations/new.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/views/password_mailer/reset.html.erb.tt +8 -5
- data/lib/generators/authentication/templates/views/password_mailer/reset.text.erb.tt +6 -5
- data/lib/generators/authentication/templates/views/password_resets/edit.html.erb.tt +4 -10
- data/lib/generators/authentication/templates/views/password_resets/new.html.erb.tt +0 -7
- data/lib/generators/authentication/templates/views/passwords/edit.html.erb.tt +3 -2
- data/lib/generators/authentication/templates/views/registrations/new.html.erb.tt +2 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff917e8d503041f0656c5897b5ccf89d2304b73633dc41198089052b3eeab2b5
|
4
|
+
data.tar.gz: c6c2d8e0be204bc3eb59bdf62aebe98a8b1de24e8610d2653bf8b274db3c3813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54a53d0d0124155b3187ee51d568310834bb63fbab8c99520ecd816bdad57ad3bdc450105509b721fce934d13952f43db08d35178c8365e63526baa940f1e32e
|
7
|
+
data.tar.gz: 629dccfe0f036adea1bdb3655d574bbbe713259ac55a56769f475405cfcb27c6006199a0b33225ca0dc6826db87e3c21ac84a9e4a1813210d304997f59acbe0d
|
data/Gemfile.lock
CHANGED
data/lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
class PasswordResetsController < ApplicationController
|
2
|
-
before_action :set_<%= singular_table_name %>, only: %i[ edit update ]
|
3
2
|
skip_before_action :authenticate
|
4
3
|
|
4
|
+
before_action :set_<%= singular_table_name %>, only: %i[ edit update ]
|
5
|
+
|
5
6
|
def edit
|
6
|
-
render json: {
|
7
|
+
render json: { error: "Open this link in your device" }, status: :not_found
|
7
8
|
end
|
8
9
|
|
9
10
|
def create
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class PasswordMailer < ApplicationMailer
|
2
2
|
def reset
|
3
|
-
@token = params[:<%= singular_table_name %>].signed_id(purpose: "password_reset", expires_in:
|
3
|
+
@token = params[:<%= singular_table_name %>].signed_id(purpose: "password_reset", expires_in: 20.minutes)
|
4
4
|
mail to: params[:<%= singular_table_name %>].email
|
5
5
|
end
|
6
6
|
end
|
@@ -1,8 +1,11 @@
|
|
1
|
-
<p>
|
1
|
+
<p>Hey there,</p>
|
2
2
|
|
3
|
-
<p>
|
3
|
+
<p>Can’t remember your password for <strong><%%= params[:<%= singular_table_name %>].email %></strong>? That’s OK, it happens. Just hit the link below to set a new one.</p>
|
4
4
|
|
5
|
-
<p><%%= link_to "
|
5
|
+
<p><%%= link_to "Reset my password", password_reset_edit_url(token: @token) %></p>
|
6
6
|
|
7
|
-
<p>If you
|
8
|
-
|
7
|
+
<p>If you did not request a password reset you can safely ignore this email, it expires in 20 minutes. Only someone with access to this email account can reset your password.</p>
|
8
|
+
|
9
|
+
<hr>
|
10
|
+
|
11
|
+
<p>Have questions or need help? Just reply to this email and our support team will help you sort it out.</p>
|
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
Hey there,
|
2
2
|
|
3
|
-
|
3
|
+
Can’t remember your password for <%%= params[:<%= singular_table_name %>].email %>? That’s OK, it happens. Just hit the link below to set a new one.
|
4
4
|
|
5
|
-
[
|
5
|
+
[Reset my password]<%%= password_reset_edit_url(token: @token) %>
|
6
6
|
|
7
|
-
If you
|
8
|
-
|
7
|
+
If you did not request a password reset you can safely ignore this email, it expires in 20 minutes. Only someone with access to this email account can reset your password.
|
8
|
+
|
9
|
+
Have questions or need help? Just reply to this email and our support team will help you sort it out.
|
@@ -14,23 +14,17 @@
|
|
14
14
|
<%% end %>
|
15
15
|
|
16
16
|
<div>
|
17
|
-
<%%= form.label :password, "New password
|
17
|
+
<%%= form.label :password, "New password", style: "display: block" %>
|
18
18
|
<%%= form.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
19
|
+
<div>8 characters minimum.</div>
|
19
20
|
</div>
|
20
21
|
|
21
22
|
<div>
|
22
|
-
<%%= form.label :password_confirmation, style: "display: block" %>
|
23
|
+
<%%= form.label :password_confirmation, "Confirm new password", style: "display: block" %>
|
23
24
|
<%%= form.password_field :password_confirmation, autocomplete: "new-password" %>
|
24
25
|
</div>
|
25
26
|
|
26
27
|
<div>
|
27
|
-
<%%= form.submit "
|
28
|
+
<%%= form.submit "Save changes" %>
|
28
29
|
</div>
|
29
30
|
<%% end %>
|
30
|
-
|
31
|
-
<br>
|
32
|
-
|
33
|
-
<div>
|
34
|
-
<%%= link_to "Sign in", sign_in_path %> |
|
35
|
-
<%%= link_to "Sign up", sign_up_path %>
|
36
|
-
</div>
|
@@ -21,12 +21,13 @@
|
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div>
|
24
|
-
<%%= form.label :password, "New password
|
24
|
+
<%%= form.label :password, "New password", style: "display: block" %>
|
25
25
|
<%%= form.password_field :password, autocomplete: "new-password" %>
|
26
|
+
<div>8 characters minimum.</div>
|
26
27
|
</div>
|
27
28
|
|
28
29
|
<div>
|
29
|
-
<%%= form.label :password_confirmation, style: "display: block" %>
|
30
|
+
<%%= form.label :password_confirmation, "Confirm new password", style: "display: block" %>
|
30
31
|
<%%= form.password_field :password_confirmation, autocomplete: "new-password" %>
|
31
32
|
</div>
|
32
33
|
|
@@ -19,8 +19,9 @@
|
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div>
|
22
|
-
<%%= form.label :password,
|
22
|
+
<%%= form.label :password, style: "display: block" %>
|
23
23
|
<%%= form.password_field :password, autocomplete: "new-password" %>
|
24
|
+
<div>8 characters minimum.</div>
|
24
25
|
</div>
|
25
26
|
|
26
27
|
<div>
|
@@ -32,9 +33,3 @@
|
|
32
33
|
<%%= form.submit "Sign up" %>
|
33
34
|
</div>
|
34
35
|
<%% end %>
|
35
|
-
|
36
|
-
<br>
|
37
|
-
|
38
|
-
<div>
|
39
|
-
<%%= link_to "Sign in", sign_in_path %>
|
40
|
-
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentication-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|