rodauth-rails 0.18.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +52 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +372 -653
  5. data/lib/generators/rodauth/install_generator.rb +32 -35
  6. data/lib/generators/rodauth/migration/active_sessions.erb +2 -2
  7. data/lib/generators/rodauth/migration/audit_logging.erb +1 -1
  8. data/lib/generators/rodauth/migration/base.erb +2 -2
  9. data/lib/generators/rodauth/migration/email_auth.erb +1 -1
  10. data/lib/generators/rodauth/migration/otp.erb +1 -1
  11. data/lib/generators/rodauth/migration/password_expiration.erb +1 -1
  12. data/lib/generators/rodauth/migration/reset_password.erb +1 -1
  13. data/lib/generators/rodauth/migration/sms_codes.erb +1 -1
  14. data/lib/generators/rodauth/migration/verify_account.erb +2 -2
  15. data/lib/generators/rodauth/migration/webauthn.erb +1 -1
  16. data/lib/generators/rodauth/migration_generator.rb +9 -2
  17. data/lib/generators/rodauth/migration_helpers.rb +8 -0
  18. data/lib/generators/rodauth/templates/INSTRUCTIONS +40 -0
  19. data/lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb +36 -19
  20. data/lib/generators/rodauth/templates/app/misc/rodauth_app.rb +27 -0
  21. data/lib/generators/rodauth/templates/app/{lib/rodauth_app.rb → misc/rodauth_main.rb} +10 -56
  22. data/lib/generators/rodauth/templates/app/models/account.rb +1 -0
  23. data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +1 -1
  24. data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +1 -1
  25. data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +1 -1
  26. data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +1 -1
  27. data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +1 -1
  28. data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +1 -1
  29. data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +1 -1
  30. data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +1 -1
  31. data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +1 -1
  32. data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +1 -1
  33. data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +1 -1
  34. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +1 -1
  35. data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +1 -1
  36. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +1 -1
  37. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +1 -1
  38. data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +1 -1
  39. data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +1 -1
  40. data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +1 -1
  41. data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +1 -1
  42. data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +1 -1
  43. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +1 -1
  44. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +1 -1
  45. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +1 -1
  46. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +1 -1
  47. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +1 -1
  48. data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +1 -1
  49. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +1 -1
  50. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +1 -1
  51. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +1 -1
  52. data/lib/rodauth/rails/app.rb +18 -4
  53. data/lib/rodauth/rails/auth.rb +1 -16
  54. data/lib/rodauth/rails/controller_methods.rb +4 -29
  55. data/lib/rodauth/rails/feature/base.rb +21 -0
  56. data/lib/rodauth/rails/feature/instrumentation.rb +1 -1
  57. data/lib/rodauth/rails/feature/internal_request.rb +10 -4
  58. data/lib/rodauth/rails/feature/render.rb +8 -0
  59. data/lib/rodauth/rails/tasks.rake +2 -2
  60. data/lib/rodauth/rails/version.rb +1 -1
  61. data/lib/rodauth/rails.rb +9 -20
  62. data/rodauth-rails.gemspec +1 -1
  63. metadata +8 -6
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.reset_password_request_page_title %>
2
2
 
3
- <%= form_with url: rodauth.reset_password_request_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.reset_password_request_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <%== rodauth.reset_password_explanatory_text %>
5
5
 
6
6
  <% if params[rodauth.login_param] && !rodauth.field_error(rodauth.login_param) %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.sms_auth_page_title %>
2
2
 
3
- <%= form_with url: rodauth.sms_auth_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.sms_auth_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <div class="form-group mb-3">
5
5
  <%= form.label "sms-code", rodauth.sms_code_label, class: "form-label" %>
6
6
  <div class="row">
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.sms_confirm_page_title %>
2
2
 
3
- <%= form_with url: rodauth.sms_confirm_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.sms_confirm_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <div class="form-group mb-3">
5
5
  <%= form.label "sms-code", rodauth.sms_code_label, class: "form-label" %>
6
6
  <div class="row">
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.sms_disable_page_title %>
2
2
 
3
- <%= form_with url: rodauth.sms_disable_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.sms_disable_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <% if rodauth.two_factor_modifications_require_password? %>
5
5
  <div class="form-group mb-3">
6
6
  <%= form.label "password", rodauth.password_label, class: "form-label" %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.sms_request_page_title %>
2
2
 
3
- <%= form_with url: rodauth.sms_request_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.sms_request_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <div class="form-group mb-3">
5
5
  <%= form.submit rodauth.sms_request_button, class: "btn btn-primary" %>
6
6
  </div>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.sms_setup_page_title %>
2
2
 
3
- <%= form_with url: rodauth.sms_setup_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.sms_setup_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <% if rodauth.two_factor_modifications_require_password? %>
5
5
  <div class="form-group mb-3">
6
6
  <%= form.label "password", rodauth.password_label, class: "form-label" %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.two_factor_disable_page_title %>
2
2
 
3
- <%= form_with url: rodauth.two_factor_disable_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.two_factor_disable_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <% if rodauth.two_factor_modifications_require_password? %>
5
5
  <div class="form-group mb-3">
6
6
  <%= form.label "password", rodauth.password_label, class: "form-label" %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.unlock_account_page_title %>
2
2
 
3
- <%= form_with url: rodauth.unlock_account_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.unlock_account_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <%== rodauth.unlock_account_explanatory_text %>
5
5
 
6
6
  <% if rodauth.unlock_account_requires_password? %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.unlock_account_request_page_title %>
2
2
 
3
- <%= form_with url: rodauth.unlock_account_request_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.unlock_account_request_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
5
5
 
6
6
  <%== rodauth.unlock_account_request_explanatory_text %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.verify_account_page_title %>
2
2
 
3
- <%= form_with url: rodauth.verify_account_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.verify_account_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <% if rodauth.verify_account_set_password? %>
5
5
  <div class="form-group mb-3">
6
6
  <%= form.label "password", rodauth.password_label, class: "form-label" %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.resend_verify_account_page_title %>
2
2
 
3
- <%= form_with url: rodauth.verify_account_resend_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.verify_account_resend_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <%== rodauth.verify_account_resend_explanatory_text %>
5
5
 
6
6
  <% if params[rodauth.login_param] %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.verify_login_change_page_title %>
2
2
 
3
- <%= form_with url: rodauth.verify_login_change_path, method: :post do |form| %>
3
+ <%= form_with url: rodauth.verify_login_change_path, method: :post, data: { turbo: false } do |form| %>
4
4
  <div class="form-group mb-3">
5
5
  <%= form.submit rodauth.verify_login_change_button, class: "btn btn-primary" %>
6
6
  </div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <% cred = rodauth.webauth_credential_options_for_get %>
4
4
 
5
- <%= form_with url: rodauth.webauthn_auth_form_path, method: :post, id: "webauthn-auth-form", data: { credential_options: cred.as_json.to_json } do |form| %>
5
+ <%= form_with url: rodauth.webauthn_auth_form_path, method: :post, id: "webauthn-auth-form", data: { credential_options: cred.as_json.to_json, turbo: false } do |form| %>
6
6
  <%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
7
7
  <%= form.hidden_field rodauth.webauthn_auth_challenge_param, value: cred.challenge %>
8
8
  <%= form.hidden_field rodauth.webauthn_auth_challenge_hmac_param, value: rodauth.compute_hmac(cred.challenge) %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :title, rodauth.webauthn_remove_page_title %>
2
2
 
3
- <%= form_with url: rodauth.webauthn_remove_path, method: :post, id: "webauthn-remove-form" do |form| %>
3
+ <%= form_with url: rodauth.webauthn_remove_path, method: :post, id: "webauthn-remove-form", data: { turbo: false } do |form| %>
4
4
  <% if rodauth.two_factor_modifications_require_password? %>
5
5
  <div class="form-group mb-3">
6
6
  <%= form.label "password", rodauth.password_label, class: "form-label" %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <% cred = rodauth.new_webauthn_credential %>
4
4
 
5
- <%= form_with url: rodauth.webauthn_setup_path, method: :post, id: "webauthn-setup-form", data: { credential_options: cred.as_json.to_json } do |form| %>
5
+ <%= form_with url: rodauth.webauthn_setup_path, method: :post, id: "webauthn-setup-form", data: { credential_options: cred.as_json.to_json, turbo: false } do |form| %>
6
6
  <%= form.hidden_field rodauth.webauthn_setup_challenge_param, value: cred.challenge %>
7
7
  <%= form.hidden_field rodauth.webauthn_setup_challenge_hmac_param, value: rodauth.compute_hmac(cred.challenge) %>
8
8
  <%= form.text_field rodauth.webauthn_setup_param, value: "", id: "webauthn-setup", aria: { hidden: "true" } %>
@@ -10,7 +10,6 @@ module Rodauth
10
10
 
11
11
  plugin :hooks
12
12
  plugin :render, layout: false
13
- plugin :pass
14
13
 
15
14
  unless Rodauth::Rails.api_only?
16
15
  require "rodauth/rails/app/flash"
@@ -25,9 +24,9 @@ module Rodauth
25
24
 
26
25
  auth_class ||= Class.new(Rodauth::Rails::Auth)
27
26
 
28
- plugin :rodauth, auth_class: auth_class, name: name, csrf: false, flash: false, json: true, **options do
29
- instance_exec(&block) if block
30
- end
27
+ plugin :rodauth, auth_class: auth_class, name: name, csrf: false, flash: false, json: true, **options, &block
28
+
29
+ self::RodaRequest.include RequestMethods
31
30
  end
32
31
 
33
32
  before do
@@ -47,6 +46,21 @@ module Rodauth
47
46
  def self.rodauth!(name)
48
47
  rodauth(name) or fail ArgumentError, "unknown rodauth configuration: #{name.inspect}"
49
48
  end
49
+
50
+ module RequestMethods
51
+ def rodauth(name = nil)
52
+ prefix = scope.rodauth(name).prefix
53
+
54
+ if prefix.present? && remaining_path == path_info
55
+ on prefix[1..-1] do
56
+ super
57
+ break # forward other `{prefix}/*` requests to the rails router
58
+ end
59
+ else
60
+ super
61
+ end
62
+ end
63
+ end
50
64
  end
51
65
  end
52
66
  end
@@ -3,23 +3,8 @@ require "rodauth/rails/feature"
3
3
 
4
4
  module Rodauth
5
5
  module Rails
6
- # Base auth class that applies some default configuration and supports
7
- # multi-level inheritance.
6
+ # Base auth class that applies some changes to the default configuration.
8
7
  class Auth < Rodauth::Auth
9
- def self.inherited(subclass)
10
- super
11
- superclass = self
12
- subclass.class_eval do
13
- @roda_class = Rodauth::Rails.app
14
- @features = superclass.features.clone
15
- @routes = superclass.routes.clone
16
- @route_hash = superclass.route_hash.clone
17
- @configuration = superclass.instance_variable_get(:@configuration).clone
18
- @configuration.instance_variable_set(:@auth, self)
19
- end
20
- end
21
-
22
- # apply default configuration
23
8
  configure do
24
9
  enable :rails
25
10
 
@@ -8,41 +8,16 @@ module Rodauth
8
8
  end
9
9
  end
10
10
 
11
- def rodauth(name = nil)
12
- request.env.fetch ["rodauth", *name].join(".")
13
- end
14
-
15
11
  def current_account(name = nil)
16
- model = rodauth(name).rails_account_model
17
- id = rodauth(name).session_value
12
+ rodauth(name).rails_account || rodauth(name).login_required
13
+ end
18
14
 
19
- @current_account ||= {}
20
- @current_account[name] ||= fetch_account(model, id) do
21
- rodauth(name).clear_session
22
- rodauth(name).login_required
23
- end
15
+ def rodauth(name = nil)
16
+ request.env.fetch ["rodauth", *name].join(".")
24
17
  end
25
18
 
26
19
  private
27
20
 
28
- def fetch_account(model, id, &not_found)
29
- if defined?(ActiveRecord::Base) && model < ActiveRecord::Base
30
- begin
31
- model.find(id)
32
- rescue ActiveRecord::RecordNotFound
33
- not_found.call
34
- end
35
- elsif model < Sequel::Model
36
- begin
37
- model.with_pk!(id)
38
- rescue Sequel::NoMatchingRow
39
- not_found.call
40
- end
41
- else
42
- fail Error, "unsupported model type: #{model}"
43
- end
44
- end
45
-
46
21
  def rodauth_response
47
22
  res = catch(:halt) { return yield }
48
23
 
@@ -8,6 +8,17 @@ module Rodauth
8
8
  feature.auth_cached_method :rails_controller_instance
9
9
  end
10
10
 
11
+ def rails_account
12
+ account_from_session unless account
13
+
14
+ unless account
15
+ clear_session if logged_in?
16
+ return
17
+ end
18
+
19
+ @rails_account ||= instantiate_rails_account
20
+ end
21
+
11
22
  # Reset Rails session to protect from session fixation attacks.
12
23
  def clear_session
13
24
  rails_controller_instance.reset_session
@@ -43,6 +54,16 @@ module Rodauth
43
54
 
44
55
  private
45
56
 
57
+ def instantiate_rails_account
58
+ if defined?(ActiveRecord::Base) && rails_account_model < ActiveRecord::Base
59
+ rails_account_model.instantiate(account.stringify_keys)
60
+ elsif defined?(Sequel::Model) && rails_account_model < Sequel::Model
61
+ rails_account_model.load(account)
62
+ else
63
+ fail Error, "unsupported model type: #{rails_account_model}"
64
+ end
65
+ end
66
+
46
67
  # Instances of the configured controller with current request's env hash.
47
68
  def _rails_controller_instance
48
69
  controller = rails_controller.new
@@ -40,7 +40,7 @@ module Rodauth
40
40
  begin
41
41
  result = catch(:halt) { yield }
42
42
 
43
- response = ActionDispatch::Response.new *(result || [404, {}, []])
43
+ response = ActionDispatch::Response.new(*(result || [404, {}, []]))
44
44
  payload[:response] = response
45
45
  payload[:status] = response.status
46
46
 
@@ -5,16 +5,17 @@ module Rodauth
5
5
  def domain
6
6
  return super unless missing_host?
7
7
 
8
- Rodauth::Rails.url_options[:host]
8
+ rails_url_options.fetch(:host)
9
9
  end
10
10
 
11
11
  def base_url
12
12
  return super unless missing_host? && domain
13
13
 
14
- url_options = Rodauth::Rails.url_options
14
+ scheme = rails_url_options[:protocol] || "http"
15
+ port = rails_url_options[:port]
15
16
 
16
- url = "#{url_options[:protocol]}://#{domain}"
17
- url << ":#{url_options[:port]}" if url_options[:port]
17
+ url = "#{scheme}://#{domain}"
18
+ url << ":#{port}" if port
18
19
  url
19
20
  end
20
21
 
@@ -40,6 +41,11 @@ module Rodauth
40
41
  def missing_host?
41
42
  internal_request? && request.host == INVALID_DOMAIN || scope.nil?
42
43
  end
44
+
45
+ def rails_url_options
46
+ ::Rails.application.config.action_mailer.default_url_options or
47
+ fail Error, "There is no information to set the URL host from. Please set config.action_mailer.default_url_options in your Rails application, or configure #domain and #base_url in your Rodauth configuration."
48
+ end
43
49
  end
44
50
  end
45
51
  end
@@ -42,6 +42,14 @@ module Rodauth
42
42
  controller.formats = rails_request.formats.map(&:ref).compact
43
43
  controller
44
44
  end
45
+
46
+ # Not all Rodauth actions are Turbo-compatible (some form submissions
47
+ # render 200 HTML responses), so we disable Turbo on all Rodauth forms.
48
+ def _view(meth, *)
49
+ html = super
50
+ html = html.gsub(/<form(.+)>/, '<form\1 data-turbo="false">') if meth == :view
51
+ html
52
+ end
45
53
  end
46
54
  end
47
55
  end
@@ -5,13 +5,13 @@ namespace :rodauth do
5
5
  puts "Routes handled by #{app}:"
6
6
 
7
7
  app.opts[:rodauths].each do |configuration_name, auth_class|
8
- auth_class.configure { enable :path_class_methods }
8
+ rodauth = auth_class.allocate
9
9
 
10
10
  routes = auth_class.routes.map do |handle_method|
11
11
  path_method = "#{handle_method.to_s.sub(/\Ahandle_/, "")}_path"
12
12
 
13
13
  [
14
- auth_class.public_send(path_method),
14
+ rodauth.public_send(path_method),
15
15
  "rodauth#{configuration_name && "(:#{configuration_name})"}.#{path_method}",
16
16
  ]
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module Rodauth
2
2
  module Rails
3
- VERSION = "0.18.1"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
data/lib/rodauth/rails.rb CHANGED
@@ -14,37 +14,32 @@ module Rodauth
14
14
  @app = nil
15
15
  @middleware = true
16
16
 
17
- LOCK = Mutex.new
18
-
19
17
  class << self
20
18
  def rodauth(name = nil, query: nil, form: nil, account: nil, **options)
21
19
  auth_class = app.rodauth!(name)
22
20
 
23
- LOCK.synchronize do
24
- unless auth_class.features.include?(:internal_request)
25
- auth_class.configure { enable :internal_request }
26
- warn "Rodauth::Rails.rodauth requires the internal_request feature to be enabled. For now it was enabled automatically, but this behaviour will be removed in version 1.0."
27
- end
28
- end
29
-
30
- if query || form
31
- warn "The :query and :form keyword arguments for Rodauth::Rails.rodauth have been deprecated. Please use the :params argument supported by internal_request feature instead."
32
- options[:params] = query || form
21
+ unless auth_class.features.include?(:internal_request)
22
+ fail Rodauth::Rails::Error, "Rodauth::Rails.rodauth requires internal_request feature to be enabled"
33
23
  end
34
24
 
35
25
  if account
36
26
  options[:account_id] = account.id
37
27
  end
38
28
 
39
- auth_class.internal_request_eval(options) do
29
+ instance = auth_class.internal_request_eval(options) do
40
30
  if defined?(ActiveRecord::Base) && account.is_a?(ActiveRecord::Base)
41
31
  @account = account.attributes.symbolize_keys
42
32
  elsif defined?(Sequel::Model) && account.is_a?(Sequel::Model)
43
33
  @account = account.values
44
34
  end
45
-
46
35
  self
47
36
  end
37
+
38
+ # clean up inspect output
39
+ instance.remove_instance_variable(:@internal_request_block)
40
+ instance.remove_instance_variable(:@internal_request_return_value)
41
+
42
+ instance
48
43
  end
49
44
 
50
45
  def model(name = nil, **options)
@@ -80,12 +75,6 @@ module Rodauth
80
75
  end
81
76
  end
82
77
 
83
- def url_options
84
- options = ::Rails.application.config.action_mailer.default_url_options || {}
85
- options[:protocol] ||= "http"
86
- options
87
- end
88
-
89
78
  def configure
90
79
  yield self
91
80
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ["lib"]
18
18
 
19
19
  spec.add_dependency "railties", ">= 4.2", "< 8"
20
- spec.add_dependency "rodauth", "~> 2.15"
20
+ spec.add_dependency "rodauth", "~> 2.19"
21
21
  spec.add_dependency "sequel-activerecord_connection", "~> 1.1"
22
22
  spec.add_dependency "tilt"
23
23
  spec.add_dependency "bcrypt"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.15'
39
+ version: '2.19'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '2.15'
46
+ version: '2.19'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sequel-activerecord_connection
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -173,9 +173,11 @@ files:
173
173
  - lib/generators/rodauth/migration/webauthn.erb
174
174
  - lib/generators/rodauth/migration_generator.rb
175
175
  - lib/generators/rodauth/migration_helpers.rb
176
+ - lib/generators/rodauth/templates/INSTRUCTIONS
176
177
  - lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb
177
- - lib/generators/rodauth/templates/app/lib/rodauth_app.rb
178
178
  - lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb
179
+ - lib/generators/rodauth/templates/app/misc/rodauth_app.rb
180
+ - lib/generators/rodauth/templates/app/misc/rodauth_main.rb
179
181
  - lib/generators/rodauth/templates/app/models/account.rb
180
182
  - lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb
181
183
  - lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
@@ -266,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
268
  - !ruby/object:Gem::Version
267
269
  version: '0'
268
270
  requirements: []
269
- rubygems_version: 3.2.15
271
+ rubygems_version: 3.3.3
270
272
  signing_key:
271
273
  specification_version: 4
272
274
  summary: Provides Rails integration for Rodauth.