authentication-zero 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f6baaecd5d394f4a5a589851c45638015379cf53022c6ca601b7aa49b46b1da
4
- data.tar.gz: 93a28f7c9762aa2534672e45d25ee75b7708ec2e53fd629497bee70c77d1bbd4
3
+ metadata.gz: 00f2558085051718c5d29c5aeb4f4f5ebb5daf9d6a165c0f8dd588771b73789a
4
+ data.tar.gz: c4c548e20a25306b3dc44cc46fd4c5dae7d798a8bce4dc352bf0bce314b33b53
5
5
  SHA512:
6
- metadata.gz: 60439dd077e66f946f61663ffc1a0d395a3dcffd25793764eb0399b1163c9061b7917cbacd98ce74695c84bb5d363d42eb04dc09a8c2ceafb33413743f101683
7
- data.tar.gz: 56756318409dbe854b7db0566e3a510f80d668aa399e38744b78aa9c3d604dd0b8a6321563b36f202dc618149ccb551ecbaf81c23b3afdbb03c766e50bb5fdac
6
+ metadata.gz: d3ea2a5b31a39bd3aa1f029c96f5c24791d6df8da63b41384e806ad79887122497e1845c4b509c4caf8414ff48eb1a6830d438c0f6d9b31870fed145999f3d84
7
+ data.tar.gz: 57b4ff721d9c4af1d30aa50f2495869d31a3a8a0d5017ee3d78d12df257625716e5dad2ba58e05a73c0c8e7a70e42bc519fe6ed77301da6fd58da0a6dddc1395
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (0.0.6)
4
+ authentication-zero (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -21,7 +21,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
21
21
 
22
22
  def create_views
23
23
  if options.api
24
- directory "views/api", "app/views"
24
+ directory "views/password_mailer", "app/views/password_mailer"
25
25
  else
26
26
  directory "views/html", "app/views"
27
27
  end
@@ -47,7 +47,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
47
47
  route "post 'cancellation', to: 'cancellations#destroy'"
48
48
  route "get 'password_reset/new', to: 'password_resets#new'" unless options.api?
49
49
  route "post 'password_reset', to: 'password_resets#create'"
50
- route "get 'password_reset/edit', to: 'password_resets#edit'" unless options.api?
50
+ route "get 'password_reset/edit', to: 'password_resets#edit'"
51
51
  route "patch 'password_reset', to: 'password_resets#update'"
52
52
  route "delete 'sign_out', to: 'sessions#destroy'"
53
53
  end
@@ -1,7 +1,11 @@
1
1
  class PasswordResetsController < ApplicationController
2
- before_action :set_<%= singular_table_name %>, only: :update
2
+ before_action :set_<%= singular_table_name %>, only: %i[ edit update ]
3
3
  skip_before_action :authenticate
4
4
 
5
+ def edit
6
+ render json: { message: "Open this link in your device" }, status: :not_found
7
+ end
8
+
5
9
  def create
6
10
  if @<%= singular_table_name %> = <%= class_name %>.find_by_email(params[:email])
7
11
  PasswordMailer.with(<%= singular_table_name %>: @<%= singular_table_name %>).reset.deliver_later
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
@@ -45,16 +45,14 @@ files:
45
45
  - lib/generators/authentication/templates/migration.rb.tt
46
46
  - lib/generators/authentication/templates/models/current.rb.tt
47
47
  - lib/generators/authentication/templates/models/resource.rb.tt
48
- - lib/generators/authentication/templates/views/api/password_mailer/reset.html.erb.tt
49
- - lib/generators/authentication/templates/views/api/password_mailer/reset.text.erb.tt
50
- - lib/generators/authentication/templates/views/html/cancellations/new.html.erb.tt
51
- - lib/generators/authentication/templates/views/html/password_mailer/reset.html.erb.tt
52
- - lib/generators/authentication/templates/views/html/password_mailer/reset.text.erb.tt
53
- - lib/generators/authentication/templates/views/html/password_resets/edit.html.erb.tt
54
- - lib/generators/authentication/templates/views/html/password_resets/new.html.erb.tt
55
- - lib/generators/authentication/templates/views/html/passwords/edit.html.erb.tt
56
- - lib/generators/authentication/templates/views/html/registrations/new.html.erb.tt
57
- - lib/generators/authentication/templates/views/html/sessions/new.html.erb.tt
48
+ - lib/generators/authentication/templates/views/cancellations/new.html.erb.tt
49
+ - lib/generators/authentication/templates/views/password_mailer/reset.html.erb.tt
50
+ - lib/generators/authentication/templates/views/password_mailer/reset.text.erb.tt
51
+ - lib/generators/authentication/templates/views/password_resets/edit.html.erb.tt
52
+ - lib/generators/authentication/templates/views/password_resets/new.html.erb.tt
53
+ - lib/generators/authentication/templates/views/passwords/edit.html.erb.tt
54
+ - lib/generators/authentication/templates/views/registrations/new.html.erb.tt
55
+ - lib/generators/authentication/templates/views/sessions/new.html.erb.tt
58
56
  homepage: https://github.com/lazaronixon/authentication-zero
59
57
  licenses:
60
58
  - MIT
@@ -1,7 +0,0 @@
1
- Hi <%%= params[:<%= singular_table_name %>].email %>,
2
-
3
- Someone requested a reset of your password.
4
-
5
- If this was you, use this token to reset your password. The token will expire automatically in 15 minutes.
6
-
7
- <%%= @token %>
@@ -1,7 +0,0 @@
1
- Hi <%%= params[:<%= singular_table_name %>].email %>,
2
-
3
- Someone requested a reset of your password.
4
-
5
- If this was you, use this token to reset your password. The token will expire automatically in 15 minutes.
6
-
7
- <%%= @token %>