rails_jwt_auth 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/mailers/rails_jwt_auth/mailer.rb +10 -6
- data/app/views/rails_jwt_auth/mailer/confirmation_instructions.html.erb +1 -1
- data/app/views/rails_jwt_auth/mailer/reset_password_instructions.html.erb +1 -1
- data/lib/rails_jwt_auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9589fdf911fced81b12de566e8f9927bdc12ce9d
|
4
|
+
data.tar.gz: a4be03afd54584155a7f0d5a99ac818abb0b83cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208a716cd5ca4cb040e4d05d90ddd98135c0911be40ba7745a7e1be595ed86ee99766209d318f42277911506bed667d6c9fef60cd32677cec0a45ee3bd433d7c
|
7
|
+
data.tar.gz: bc03c6fe5c4209dce482f26c3fe400d6720f2057592bb0c78b944212ea69e6165a4422ca7240cc99b65512323c981a2e1f90a182441879546d14d37e70eb18e6
|
data/README.md
CHANGED
@@ -294,7 +294,7 @@ Password api is defined by RailsJwtAuth::PasswordsController.
|
|
294
294
|
|
295
295
|
```js
|
296
296
|
{
|
297
|
-
url: host/
|
297
|
+
url: host/password,
|
298
298
|
method: POST,
|
299
299
|
data: {
|
300
300
|
email: "user@example.com"
|
@@ -306,7 +306,7 @@ Password api is defined by RailsJwtAuth::PasswordsController.
|
|
306
306
|
|
307
307
|
```js
|
308
308
|
{
|
309
|
-
url: host/
|
309
|
+
url: host/password,
|
310
310
|
method: PUT,
|
311
311
|
data: {
|
312
312
|
reset_password_token: "token",
|
@@ -7,9 +7,11 @@ if defined?(ActionMailer)
|
|
7
7
|
@user = user
|
8
8
|
|
9
9
|
if RailsJwtAuth.confirmation_url
|
10
|
-
url =
|
11
|
-
|
12
|
-
@
|
10
|
+
url, params = RailsJwtAuth.confirmation_url.split('?')
|
11
|
+
params = params ? params.split('&') : []
|
12
|
+
params.push("confirmation_token=#{@user.confirmation_token}")
|
13
|
+
|
14
|
+
@confirmation_url = "#{url}?#{params.join('&')}"
|
13
15
|
else
|
14
16
|
@confirmation_url = confirmation_url(confirmation_token: @user.confirmation_token)
|
15
17
|
end
|
@@ -23,9 +25,11 @@ if defined?(ActionMailer)
|
|
23
25
|
@user = user
|
24
26
|
|
25
27
|
if RailsJwtAuth.reset_password_url
|
26
|
-
url =
|
27
|
-
|
28
|
-
@
|
28
|
+
url, params = RailsJwtAuth.reset_password_url.split('?')
|
29
|
+
params = params ? params.split('&') : []
|
30
|
+
params.push("reset_password_token=#{@user.reset_password_token}")
|
31
|
+
|
32
|
+
@reset_password_url = "#{url}?#{params.join('&')}"
|
29
33
|
else
|
30
34
|
@reset_password_url = password_url(reset_password_token: @user.reset_password_token)
|
31
35
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
4
|
|
5
|
-
<p><%= link_to 'Change my password', @reset_password_url %></p>
|
5
|
+
<p><%= link_to 'Change my password', @reset_password_url.html_safe %></p>
|
6
6
|
|
7
7
|
<p>If you didn't request this, please ignore this email.</p>
|
8
8
|
<p>Your password won't change until you access the link above and create a new one.</p>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_jwt_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rjurado
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|