devise-ios-rails 1.0.0

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.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +114 -0
  3. data/Rakefile +3 -0
  4. data/app/controllers/devise_ios_rails/passwords_controller.rb +29 -0
  5. data/app/controllers/devise_ios_rails/registrations_controller.rb +19 -0
  6. data/app/serializers/errors_serializer.rb +16 -0
  7. data/app/services/devise_ios_rails/change_password_service.rb +26 -0
  8. data/lib/devise-ios-rails.rb +54 -0
  9. data/lib/devise-ios-rails/engine.rb +5 -0
  10. data/lib/devise-ios-rails/rails/routes.rb +19 -0
  11. data/lib/devise-ios-rails/version.rb +3 -0
  12. data/lib/tasks/devise-ios-rails_tasks.rake +4 -0
  13. data/spec/devise-ios-rails_test.rb +7 -0
  14. data/spec/dummy/Gemfile +75 -0
  15. data/spec/dummy/Gemfile.lock +537 -0
  16. data/spec/dummy/README.md +225 -0
  17. data/spec/dummy/Rakefile +6 -0
  18. data/spec/dummy/app/assets/javascripts/active_admin.js.coffee +1 -0
  19. data/spec/dummy/app/assets/javascripts/application.js.coffee +0 -0
  20. data/spec/dummy/app/assets/javascripts/secret_spaces.coffee +3 -0
  21. data/spec/dummy/app/assets/stylesheets/active_admin.css.scss +17 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -0
  23. data/spec/dummy/app/assets/stylesheets/scaffolds.css.scss +69 -0
  24. data/spec/dummy/app/assets/stylesheets/secret_spaces.css.scss +3 -0
  25. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  26. data/spec/dummy/app/controllers/secret_spaces_controller.rb +49 -0
  27. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  28. data/spec/dummy/app/helpers/secret_spaces_helper.rb +2 -0
  29. data/spec/dummy/app/models/secret_space.rb +3 -0
  30. data/spec/dummy/app/models/user.rb +5 -0
  31. data/spec/dummy/app/serializers/secret_space_serializer.rb +3 -0
  32. data/spec/dummy/app/serializers/user_serializer.rb +8 -0
  33. data/spec/dummy/app/serializers/v1/base_serializer.rb +5 -0
  34. data/spec/dummy/app/serializers/v1/user_serializer.rb +4 -0
  35. data/spec/dummy/app/views/secret_spaces/_form.html.haml +13 -0
  36. data/spec/dummy/app/views/secret_spaces/edit.html.haml +7 -0
  37. data/spec/dummy/app/views/secret_spaces/index.html.haml +19 -0
  38. data/spec/dummy/app/views/secret_spaces/new.html.haml +5 -0
  39. data/spec/dummy/app/views/secret_spaces/show.html.haml +9 -0
  40. data/spec/dummy/bin/bundle +3 -0
  41. data/spec/dummy/bin/bundler +16 -0
  42. data/spec/dummy/bin/rails +8 -0
  43. data/spec/dummy/bin/rake +8 -0
  44. data/spec/dummy/bin/rspec +20 -0
  45. data/spec/dummy/bin/spring +18 -0
  46. data/spec/dummy/config.ru +12 -0
  47. data/spec/dummy/config/application.rb +23 -0
  48. data/spec/dummy/config/boot.rb +8 -0
  49. data/spec/dummy/config/database.yml +20 -0
  50. data/spec/dummy/config/deploy.rb +48 -0
  51. data/spec/dummy/config/deploy/production.rb +5 -0
  52. data/spec/dummy/config/deploy/staging.rb +4 -0
  53. data/spec/dummy/config/environment.rb +5 -0
  54. data/spec/dummy/config/environments/development.rb +19 -0
  55. data/spec/dummy/config/environments/heroku.rb +26 -0
  56. data/spec/dummy/config/environments/production.rb +26 -0
  57. data/spec/dummy/config/environments/staging.rb +27 -0
  58. data/spec/dummy/config/environments/test.rb +14 -0
  59. data/spec/dummy/config/initializers/active_model_serializer.rb +5 -0
  60. data/spec/dummy/config/initializers/assets.rb +8 -0
  61. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  63. data/spec/dummy/config/initializers/devise.rb +47 -0
  64. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  65. data/spec/dummy/config/initializers/inflections.rb +16 -0
  66. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  67. data/spec/dummy/config/initializers/session_store.rb +3 -0
  68. data/spec/dummy/config/initializers/simple_token_authentication.rb +25 -0
  69. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/spec/dummy/config/locales/devise.en.yml +60 -0
  71. data/spec/dummy/config/locales/en.yml +23 -0
  72. data/spec/dummy/config/routes.rb +10 -0
  73. data/spec/dummy/config/secrets.yml +17 -0
  74. data/spec/dummy/db/migrate/20141127081722_devise_create_users.rb +19 -0
  75. data/spec/dummy/db/migrate/20141127114158_add_authentication_token_to_users.rb +6 -0
  76. data/spec/dummy/db/migrate/20141201085308_add_unique_index_to_authentication_token_in_users.rb +6 -0
  77. data/spec/dummy/db/migrate/20141201111915_remove_username_from_users.rb +5 -0
  78. data/spec/dummy/db/migrate/20141208080520_create_secret_spaces.rb +9 -0
  79. data/spec/dummy/db/migrate/20141215153026_create_active_admin_comments.rb +19 -0
  80. data/spec/dummy/db/saaskit_development.sqlite3 +0 -0
  81. data/spec/dummy/db/saaskit_test.sqlite3 +0 -0
  82. data/spec/dummy/db/schema.rb +51 -0
  83. data/spec/dummy/db/seeds.rb +1 -0
  84. data/spec/dummy/log/development.log +610 -0
  85. data/spec/dummy/log/test.log +10113 -0
  86. data/spec/dummy/spec/api/v1/authorized_users_spec.rb +141 -0
  87. data/spec/dummy/spec/api/v1/login_spec.rb +82 -0
  88. data/spec/dummy/spec/api/v1/request_password_reset_spec.rb +39 -0
  89. data/spec/dummy/spec/api/v1/unauthorized_users_spec.rb +69 -0
  90. data/spec/dummy/spec/factories/authentications.rb +48 -0
  91. data/spec/dummy/spec/factories/secret_spaces.rb +6 -0
  92. data/spec/dummy/spec/factories/users.rb +13 -0
  93. data/spec/dummy/spec/factories_spec.rb +21 -0
  94. data/spec/dummy/spec/rails_helper.rb +16 -0
  95. data/spec/dummy/spec/serializers/v1/user_serializer_spec.rb +12 -0
  96. data/spec/dummy/spec/services/devise_ios_rails/change_password_service_spec.rb +47 -0
  97. data/spec/dummy/spec/spec_helper.rb +24 -0
  98. data/spec/dummy/spec/support/devise.rb +3 -0
  99. data/spec/dummy/spec/support/factory_girl.rb +7 -0
  100. data/spec/dummy/spec/support/helpers/json.rb +3 -0
  101. data/spec/dummy/spec/support/shared_contexts/authenticated.rb +3 -0
  102. data/spec/dummy/spec/support/shared_contexts/json_format.rb +5 -0
  103. data/spec/dummy/spec/support/shared_examples/authorized.rb +18 -0
  104. data/spec/dummy/spec/support/shared_examples/requests.rb +65 -0
  105. data/spec/rails_helper.rb +52 -0
  106. data/spec/serializers/errors_serializer_spec.rb +11 -0
  107. data/spec/spec_helper.rb +85 -0
  108. metadata +336 -0
@@ -0,0 +1,7 @@
1
+ %h1 Editing secret_space
2
+
3
+ = render 'form'
4
+
5
+ = link_to 'Show', @secret_space
6
+ \|
7
+ = link_to 'Back', secret_spaces_path
@@ -0,0 +1,19 @@
1
+ %h1 Listing secret_spaces
2
+
3
+ %table
4
+ %tr
5
+ %th Text
6
+ %th
7
+ %th
8
+ %th
9
+
10
+ - @secret_spaces.each do |secret_space|
11
+ %tr
12
+ %td= secret_space.text
13
+ %td= link_to 'Show', secret_space
14
+ %td= link_to 'Edit', edit_secret_space_path(secret_space)
15
+ %td= link_to 'Destroy', secret_space, :method => :delete, :data => { :confirm => 'Are you sure?' }
16
+
17
+ %br
18
+
19
+ = link_to 'New Secret space', new_secret_space_path
@@ -0,0 +1,5 @@
1
+ %h1 New secret_space
2
+
3
+ = render 'form'
4
+
5
+ = link_to 'Back', secret_spaces_path
@@ -0,0 +1,9 @@
1
+ %p#notice= notice
2
+
3
+ %p
4
+ %b Text:
5
+ = @secret_space.text
6
+
7
+ = link_to 'Edit', edit_secret_space_path(@secret_space)
8
+ \|
9
+ = link_to 'Back', secret_spaces_path
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'bundler' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('bundler', 'bundler')
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path("../spring", __FILE__)
4
+ rescue LoadError
5
+ end
6
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
7
+ require_relative '../config/boot'
8
+ require 'rails/commands'
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path("../spring", __FILE__)
4
+ rescue LoadError
5
+ end
6
+ require_relative '../config/boot'
7
+ require 'rake'
8
+ Rake.application.run
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path("../spring", __FILE__)
4
+ rescue LoadError
5
+ end
6
+ #
7
+ # This file was generated by Bundler.
8
+ #
9
+ # The application 'rspec' is installed as part of a gem, and
10
+ # this file is here to facilitate running it.
11
+ #
12
+
13
+ require 'pathname'
14
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
15
+ Pathname.new(__FILE__).realpath)
16
+
17
+ require 'rubygems'
18
+ require 'bundler/setup'
19
+
20
+ load Gem.bin_path('rspec-core', 'rspec')
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast
4
+ # It gets overwritten when you run the `spring binstub` command
5
+
6
+ unless defined?(Spring)
7
+ require "rubygems"
8
+ require "bundler"
9
+
10
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
11
+ ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
12
+ ENV["GEM_HOME"] = ""
13
+ Gem.paths = ENV
14
+
15
+ gem "spring", match[1]
16
+ require "spring/binstub"
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+
5
+ use Rack::Cors do
6
+ allow do
7
+ origins '*'
8
+ resource '*', headers: :any, methods: [:get, :post, :put, :delete, :options]
9
+ end
10
+ end
11
+
12
+ run Rack::Cascade.new [Rails.application]
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+ require 'rails/all'
3
+
4
+ Bundler.require(*Rails.groups)
5
+
6
+ module DeviseIosRailsExample
7
+ class Application < Rails::Application
8
+
9
+ config.generators do |g|
10
+ g.test_framework :rspec,
11
+ fixtures: true,
12
+ view_specs: false,
13
+ helper_specs: false,
14
+ routing_specs: false,
15
+ controller_specs: false,
16
+ request_specs: false
17
+ g.fixture_replacement :factory_girl, dir: "spec/factories"
18
+ end
19
+ config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
20
+ config.autoload_paths << Rails.root.join('lib')
21
+ config.autoload_paths << Rails.root.join(config.root, 'app', 'services')
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../spec/dummy/Gemfile', __FILE__)
3
+
4
+ if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ require 'bundler/setup'
6
+ else
7
+ raise "no file #{ENV['BUNDLE_GEMFILE']}"
8
+ end
@@ -0,0 +1,20 @@
1
+ heroku:
2
+ adapter: sqlite3
3
+ host: localhost
4
+ database: db/saaskit_heroku.sqlite3
5
+ pool: 5
6
+ username: saaskit
7
+
8
+ development:
9
+ adapter: sqlite3
10
+ host: localhost
11
+ database: db/saaskit_development.sqlite3
12
+ pool: 5
13
+ username: saaskit
14
+
15
+ test:
16
+ adapter: sqlite3
17
+ host: localhost
18
+ database: db/saaskit_test.sqlite3
19
+ pool: 5
20
+ username: saaskit
@@ -0,0 +1,48 @@
1
+ require 'net/ssh/proxy/command'
2
+
3
+ # config valid only for Capistrano 3.1
4
+ lock '3.2.1'
5
+
6
+ # Default value for :format is :pretty
7
+ # set :format, :pretty
8
+
9
+ # Default value for :pty is false
10
+ # set :pty, true
11
+
12
+ # Default value for default_env is {}
13
+ # set :default_env, { path: "/opt/ruby/bin:$PATH" }
14
+
15
+ # Default value for keep_releases is 5
16
+ # set :keep_releases, 5
17
+
18
+ set :ssh_options, proxy: Net::SSH::Proxy::Command.new('ssh devise-ios-rails-example@g.devguru.co -W %h:%p')
19
+ set :rvm_ruby_version, '2.1.5'
20
+ set :bundle_jobs, 8
21
+ set :bundle_flags, '--deployment'
22
+ set :repo_url, "git@github.com:netguru/devise-ios-rails-example.git"
23
+ set :rails_env, ->{ fetch(:stage) }
24
+ set :user, ->{ fetch(:application) }
25
+ set :deploy_to, ->{ "/home/#{fetch(:user)}/app" }
26
+ set :rvm_type, :system
27
+
28
+ branches = { production: :production, beta: :beta, staging: :master }
29
+ set :branch, ->{ branches[fetch(:stage).to_sym].to_s }
30
+
31
+ set :scm, :git
32
+ set :log_level, :info
33
+
34
+ set :linked_files, %w{config/database.yml .env}
35
+ set :linked_dirs, %w{bin bundle log tmp}
36
+
37
+ namespace :deploy do
38
+ desc 'Restart application'
39
+ task :restart do
40
+ on roles(:app), in: :sequence, wait: 5 do
41
+ execute :touch, release_path.join('tmp/restart.txt')
42
+ end
43
+ end
44
+
45
+ after :finishing, 'deploy:cleanup'
46
+ end
47
+
48
+ after "deploy:publishing", "deploy:restart"
@@ -0,0 +1,5 @@
1
+ set :stage, :production
2
+ set :application, "devise_ios_rails"
3
+
4
+ server 'p.devguru.co', user: 'devise_ios_rails', roles: %w{web app}
5
+ server 'p.devguru.co', user: 'devise_ios_rails', roles: %w{web app}
@@ -0,0 +1,4 @@
1
+ set :stage, :staging
2
+ set :application, "devise_ios_rails"
3
+
4
+ server 'c.devguru.co', user: 'devise-ios-rails-example', roles: %w{web app db}
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,19 @@
1
+ Rails.application.configure do
2
+ config.cache_classes = false
3
+ config.eager_load = false
4
+ config.consider_all_requests_local = true
5
+ config.action_controller.perform_caching = false
6
+ config.active_support.deprecation = :log
7
+ config.active_record.migration_error = :page_load
8
+
9
+ config.assets.debug = true
10
+ config.assets.raise_runtime_errors = true
11
+ config.assets.precompile += %w()
12
+
13
+ config.action_mailer.raise_delivery_errors = false
14
+ config.action_mailer.delivery_method = :letter_opener
15
+ config.action_mailer.default_url_options =
16
+ { host: ENV.fetch('DOMAIN_NAME') { 'localhost:3000' } }
17
+ config.action_mailer.raise_delivery_errors = true
18
+ config.action_mailer.perform_deliveries = true
19
+ end
@@ -0,0 +1,26 @@
1
+ require 'netguru/middleware/block'
2
+
3
+ Rails.application.configure do
4
+ config.cache_classes = true
5
+ config.eager_load = true
6
+ config.consider_all_requests_local = false
7
+ config.action_controller.perform_caching = true
8
+ config.log_level = :info
9
+ config.i18n.fallbacks = true
10
+ config.active_support.deprecation = :notify
11
+ config.log_formatter = ::Logger::Formatter.new
12
+ config.active_record.dump_schema_after_migration = false
13
+ config.force_ssl = false
14
+
15
+ config.serve_static_assets = false
16
+ config.assets.js_compressor = :uglifier
17
+ config.assets.compile = false
18
+ config.assets.digest = true
19
+ config.assets.compress = true
20
+
21
+ config.action_mailer.raise_delivery_errors = false
22
+ config.action_mailer.delivery_method = :letter_opener_web
23
+ config.action_mailer.default_url_options = { host: ENV.fetch('DOMAIN_NAME') }
24
+ config.action_mailer.raise_delivery_errors = true
25
+ config.action_mailer.perform_deliveries = true
26
+ end
@@ -0,0 +1,26 @@
1
+ require 'netguru/middleware/block'
2
+
3
+ Rails.application.configure do
4
+ config.cache_classes = true
5
+ config.eager_load = true
6
+ config.consider_all_requests_local = false
7
+ config.action_controller.perform_caching = true
8
+ config.log_level = :info
9
+ config.i18n.fallbacks = true
10
+ config.active_support.deprecation = :notify
11
+ config.log_formatter = ::Logger::Formatter.new
12
+ config.active_record.dump_schema_after_migration = false
13
+ config.force_ssl = false
14
+
15
+ config.serve_static_files = false
16
+ config.assets.js_compressor = :uglifier
17
+ config.assets.compile = false
18
+ config.assets.digest = true
19
+ config.assets.compress = true
20
+
21
+ config.action_mailer.default_url_options = { host: ENV.fetch('DOMAIN_NAME') }
22
+ config.action_mailer.delivery_method = :smtp
23
+ config.action_mailer.perform_deliveries = true
24
+ config.action_mailer.raise_delivery_errors = false
25
+ config.action_mailer.smtp_settings = {}
26
+ end
@@ -0,0 +1,27 @@
1
+ require 'netguru/middleware/block'
2
+
3
+ Rails.application.configure do
4
+ config.cache_classes = true
5
+ config.eager_load = true
6
+ config.consider_all_requests_local = false
7
+ config.action_controller.perform_caching = true
8
+ config.force_ssl = true
9
+ config.log_level = :debug
10
+ config.action_view.logger = nil
11
+ config.i18n.fallbacks = true
12
+ config.active_support.deprecation = :notify
13
+ config.log_formatter = ::Logger::Formatter.new
14
+ config.active_record.dump_schema_after_migration = false
15
+
16
+ config.serve_static_files = false
17
+ config.assets.compress = false
18
+ config.assets.compile = true
19
+ config.assets.digest = true
20
+ config.assets.version = '1.0'
21
+
22
+ config.action_mailer.default_url_options = { host: ENV.fetch('DOMAIN_NAME') }
23
+ config.action_mailer.delivery_method = :smtp
24
+ config.action_mailer.perform_deliveries = true
25
+ config.action_mailer.raise_delivery_errors = true
26
+ config.action_mailer.smtp_settings = {}
27
+ end
@@ -0,0 +1,14 @@
1
+ DeviseIosRailsExample::Application.configure do
2
+ config.cache_classes = true
3
+ config.eager_load = false
4
+ config.serve_static_files = true
5
+ config.static_cache_control = 'public, max-age=3600'
6
+ config.consider_all_requests_local = true
7
+ config.action_controller.perform_caching = false
8
+ config.action_dispatch.show_exceptions = false
9
+ config.action_controller.allow_forgery_protection = false
10
+ config.action_mailer.delivery_method = :test
11
+ config.action_mailer.default_url_options =
12
+ { host: ENV.fetch('DOMAIN_NAME') { 'example.com' } }
13
+ config.active_support.deprecation = :stderr
14
+ end
@@ -0,0 +1,5 @@
1
+ require 'active_model/serializer'
2
+
3
+ ActiveModel::Serializer.setup do |config|
4
+ config.key_format = :lower_camel
5
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,47 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ config.secret_key = ENV.fetch('SECRET_KEY_BASE')
5
+
6
+ # ==> Mailer Configuration
7
+ config.mailer_sender = ENV.fetch('DEFAULT_SENDER')
8
+ config.mailer = 'Devise::Mailer'
9
+
10
+ # ==> ORM configuration
11
+ require 'devise/orm/active_record'
12
+ config.authentication_keys = [ :email ]
13
+ config.case_insensitive_keys = [ :email ]
14
+ config.strip_whitespace_keys = [ :email ]
15
+ config.params_authenticatable = true
16
+ config.http_authenticatable = false
17
+ config.http_authenticatable_on_xhr = true
18
+ config.http_authentication_realm = 'Application'
19
+ config.paranoid = true
20
+ config.skip_session_storage = [:http_auth]
21
+ config.clean_up_csrf_token_on_authentication = true
22
+
23
+ # ==> Configuration for :database_authenticatable
24
+ config.stretches = Rails.env.test? ? 1 : 10
25
+
26
+ # ==> Configuration for :rememberable
27
+ config.remember_for = 2.weeks
28
+ config.expire_all_remember_me_on_sign_out = true
29
+ config.extend_remember_period = false
30
+
31
+ # ==> Configuration for :validatable
32
+ config.password_length = 4..128
33
+ config.timeout_in = 30.minutes
34
+ config.expire_auth_token_on_timeout = false
35
+
36
+ # ==> Configuration for :recoverable
37
+ config.reset_password_keys = [ :email ]
38
+ config.reset_password_within = 6.hours
39
+
40
+ # ==> Scopes configuration
41
+ config.scoped_views = false
42
+ config.default_scope = :user
43
+ config.sign_out_all_scopes = true
44
+
45
+ # ==> Navigation configuration
46
+ config.sign_out_via = :delete
47
+ end