two_factor_auth 0.1.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.
Files changed (103) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +634 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/javascripts/two_factor_auth/application.js +13 -0
  5. data/app/assets/stylesheets/two_factor_auth/application.css +15 -0
  6. data/app/controllers/two_factor_auth/authentications_controller.rb +32 -0
  7. data/app/controllers/two_factor_auth/registrations_controller.rb +29 -0
  8. data/app/controllers/two_factor_auth/trusted_facets_controller.rb +10 -0
  9. data/app/controllers/two_factor_auth/two_factor_auth_controller.rb +19 -0
  10. data/app/helpers/two_factor_auth/application_helper.rb +21 -0
  11. data/app/helpers/two_factor_auth/authentications_helper.rb +17 -0
  12. data/app/helpers/two_factor_auth/registrations_helper.rb +17 -0
  13. data/app/models/two_factor_auth/authentication_client_data.rb +11 -0
  14. data/app/models/two_factor_auth/authentication_request.rb +30 -0
  15. data/app/models/two_factor_auth/authentication_response.rb +49 -0
  16. data/app/models/two_factor_auth/authentication_verifier.rb +68 -0
  17. data/app/models/two_factor_auth/client_data.rb +57 -0
  18. data/app/models/two_factor_auth/registration.rb +18 -0
  19. data/app/models/two_factor_auth/registration_request.rb +33 -0
  20. data/app/models/two_factor_auth/registration_response.rb +91 -0
  21. data/app/models/two_factor_auth/registration_verifier.rb +91 -0
  22. data/app/views/layouts/two_factor_auth/application.html.erb +16 -0
  23. data/app/views/two_factor_auth/authentications/new.html.erb +30 -0
  24. data/app/views/two_factor_auth/registrations/new.html.erb +26 -0
  25. data/config/routes.rb +3 -0
  26. data/lib/generators/templates/README +6 -0
  27. data/lib/generators/templates/initializer.rb +38 -0
  28. data/lib/generators/templates/migration.rb +15 -0
  29. data/lib/generators/two_factor_auth/install_generator.rb +32 -0
  30. data/lib/tasks/two_factor_auth_tasks.rake +13 -0
  31. data/lib/two_factor_auth/authentication_hook.rb +18 -0
  32. data/lib/two_factor_auth/engine.rb +5 -0
  33. data/lib/two_factor_auth/registration_hook.rb +17 -0
  34. data/lib/two_factor_auth/version.rb +3 -0
  35. data/lib/two_factor_auth.rb +155 -0
  36. data/test/controllers/two_factor_auth/authentications_controller_test.rb +70 -0
  37. data/test/controllers/two_factor_auth/registrations_controller_test.rb +57 -0
  38. data/test/controllers/two_factor_auth/trusted_facets_controller_test.rb +17 -0
  39. data/test/dummy/README.rdoc +28 -0
  40. data/test/dummy/Rakefile +6 -0
  41. data/test/dummy/app/assets/javascripts/application.js +13 -0
  42. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  43. data/test/dummy/app/controllers/application_controller.rb +5 -0
  44. data/test/dummy/app/controllers/secrets_controller.rb +3 -0
  45. data/test/dummy/app/helpers/application_helper.rb +2 -0
  46. data/test/dummy/app/models/user.rb +8 -0
  47. data/test/dummy/app/views/layouts/application.html.erb +16 -0
  48. data/test/dummy/app/views/secrets/index.html.erb +10 -0
  49. data/test/dummy/bin/bundle +3 -0
  50. data/test/dummy/bin/rails +4 -0
  51. data/test/dummy/bin/rake +4 -0
  52. data/test/dummy/config/application.rb +24 -0
  53. data/test/dummy/config/boot.rb +5 -0
  54. data/test/dummy/config/database.yml +25 -0
  55. data/test/dummy/config/environment.rb +5 -0
  56. data/test/dummy/config/environments/development.rb +37 -0
  57. data/test/dummy/config/environments/production.rb +78 -0
  58. data/test/dummy/config/environments/test.rb +39 -0
  59. data/test/dummy/config/initializers/assets.rb +8 -0
  60. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  61. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  62. data/test/dummy/config/initializers/devise.rb +259 -0
  63. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/test/dummy/config/initializers/inflections.rb +16 -0
  65. data/test/dummy/config/initializers/mime_types.rb +4 -0
  66. data/test/dummy/config/initializers/session_store.rb +3 -0
  67. data/test/dummy/config/initializers/two_factor_auth.rb +38 -0
  68. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  69. data/test/dummy/config/locales/devise.en.yml +60 -0
  70. data/test/dummy/config/locales/en.yml +23 -0
  71. data/test/dummy/config/routes.rb +5 -0
  72. data/test/dummy/config/secrets.yml +22 -0
  73. data/test/dummy/config.ru +4 -0
  74. data/test/dummy/db/development.sqlite3 +0 -0
  75. data/test/dummy/db/migrate/20141026231953_devise_create_users.rb +42 -0
  76. data/test/dummy/db/migrate/20141224135949_create_two_factor_auth_registrations.rb +15 -0
  77. data/test/dummy/db/schema.rb +50 -0
  78. data/test/dummy/db/test.sqlite3 +0 -0
  79. data/test/dummy/log/development.log +198 -0
  80. data/test/dummy/log/test.log +3490 -0
  81. data/test/dummy/public/404.html +67 -0
  82. data/test/dummy/public/422.html +67 -0
  83. data/test/dummy/public/500.html +66 -0
  84. data/test/dummy/public/favicon.ico +0 -0
  85. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  86. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  87. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  90. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  91. data/test/helpers/two_factor_auth/authentication_helper_test.rb +54 -0
  92. data/test/helpers/two_factor_auth/registrations_helper_test.rb +34 -0
  93. data/test/integration/navigation_test.rb +10 -0
  94. data/test/lib/two_factor_auth_test.rb +169 -0
  95. data/test/models/two_factor_auth/authentication_request_test.rb +35 -0
  96. data/test/models/two_factor_auth/authentication_response_test.rb +44 -0
  97. data/test/models/two_factor_auth/authentication_verifier_test.rb +83 -0
  98. data/test/models/two_factor_auth/client_data_test.rb +79 -0
  99. data/test/models/two_factor_auth/registration_request_test.rb +29 -0
  100. data/test/models/two_factor_auth/registration_response_test.rb +87 -0
  101. data/test/models/two_factor_auth/registration_verifier_test.rb +96 -0
  102. data/test/test_helper.rb +43 -0
  103. metadata +351 -0
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ devise_for :users
3
+ two_factor_auth_for :users
4
+ root to: 'secrets#index'
5
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 17fde4f102299a5a3dda77cf13dfe5349357e7cb586f9ce961a6925f873822cc9be5f6a0151cfdfa8d35fe0bcbdf6e3993d2cf61b9434c34300d9ab67e5bf764
15
+
16
+ test:
17
+ secret_key_base: 4d40baee7a6c10ddd87e1ea6d49f036d7f5a58159792bc73fe5cde574e37897b9d4a297210173a638909dca67c646efdbb7ceb90b3e3621bd7f73f1c3b06453a
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
Binary file
@@ -0,0 +1,42 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, null: false, default: ""
6
+ t.string :encrypted_password, null: false, default: ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, default: 0, null: false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+
34
+ t.timestamps
35
+ end
36
+
37
+ add_index :users, :email, unique: true
38
+ add_index :users, :reset_password_token, unique: true
39
+ # add_index :users, :confirmation_token, unique: true
40
+ # add_index :users, :unlock_token, unique: true
41
+ end
42
+ end
@@ -0,0 +1,15 @@
1
+ class CreateTwoFactorAuthRegistrations < ActiveRecord::Migration
2
+ def change
3
+ create_table :two_factor_auth_registrations do |t|
4
+ t.references :login, polymorphic: true, null: false, index: true
5
+ t.binary :key_handle, null: false, limit: 65 # Defined in FIDO spec
6
+ t.binary :public_key, null: false, limit: 10.kilobytes
7
+ t.binary :certificate, null: false, limit: 1.megabyte, default: ""
8
+ t.integer :counter, null: false, limit: 5, default: 0 # limit in bytes; no easy way to get a 32b *unsigned*
9
+ t.timestamp :last_authenticated_at, null: false
10
+ t.timestamps
11
+ end
12
+ add_index :two_factor_auth_registrations, :key_handle
13
+ add_index :two_factor_auth_registrations, :last_authenticated_at
14
+ end
15
+ end
@@ -0,0 +1,50 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20141224135949) do
15
+
16
+ create_table "two_factor_auth_registrations", force: true do |t|
17
+ t.integer "login_id", null: false
18
+ t.string "login_type", null: false
19
+ t.binary "key_handle", limit: 65, null: false
20
+ t.binary "public_key", limit: 10240, null: false
21
+ t.binary "certificate", limit: 1048576, default: "x''", null: false
22
+ t.integer "counter", limit: 5, default: 0, null: false
23
+ t.datetime "last_authenticated_at", null: false
24
+ t.datetime "created_at"
25
+ t.datetime "updated_at"
26
+ end
27
+
28
+ add_index "two_factor_auth_registrations", ["key_handle"], name: "index_two_factor_auth_registrations_on_key_handle"
29
+ add_index "two_factor_auth_registrations", ["last_authenticated_at"], name: "index_two_factor_auth_registrations_on_last_authenticated_at"
30
+ add_index "two_factor_auth_registrations", ["login_id", "login_type"], name: "index_two_factor_auth_registrations_on_login_id_and_login_type"
31
+
32
+ create_table "users", force: true do |t|
33
+ t.string "email", default: "", null: false
34
+ t.string "encrypted_password", default: "", null: false
35
+ t.string "reset_password_token"
36
+ t.datetime "reset_password_sent_at"
37
+ t.datetime "remember_created_at"
38
+ t.integer "sign_in_count", default: 0, null: false
39
+ t.datetime "current_sign_in_at"
40
+ t.datetime "last_sign_in_at"
41
+ t.string "current_sign_in_ip"
42
+ t.string "last_sign_in_ip"
43
+ t.datetime "created_at"
44
+ t.datetime "updated_at"
45
+ end
46
+
47
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
48
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
49
+
50
+ end
Binary file
@@ -0,0 +1,198 @@
1
+  (22.0ms) CREATE TABLE "two_factor_auth_registrations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login_id" integer NOT NULL, "login_type" varchar(255) NOT NULL, "key_handle" blob(65) NOT NULL, "public_key" blob(10240) NOT NULL, "certificate" blob(1048576) DEFAULT x'782737383237323727' NOT NULL, "counter" integer(5) DEFAULT 0 NOT NULL, "last_authenticated_at" datetime NOT NULL, "created_at" datetime, "updated_at" datetime) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (16.7ms) CREATE INDEX "index_two_factor_auth_registrations_on_key_handle" ON "two_factor_auth_registrations" ("key_handle")
4
+  (0.1ms) SELECT sql
5
+ FROM sqlite_master
6
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
7
+ UNION ALL
8
+ SELECT sql
9
+ FROM sqlite_temp_master
10
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
11
+
12
+  (17.1ms) CREATE INDEX "index_two_factor_auth_registrations_on_last_authenticated_at" ON "two_factor_auth_registrations" ("last_authenticated_at")
13
+  (0.1ms) SELECT sql
14
+ FROM sqlite_master
15
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
16
+ UNION ALL
17
+ SELECT sql
18
+ FROM sqlite_temp_master
19
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
20
+
21
+  (0.1ms)  SELECT sql
22
+ FROM sqlite_master
23
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
24
+ UNION ALL
25
+ SELECT sql
26
+ FROM sqlite_temp_master
27
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
28
+ 
29
+  (17.0ms) CREATE INDEX "index_two_factor_auth_registrations_on_login_id_and_login_type" ON "two_factor_auth_registrations" ("login_id", "login_type")
30
+  (18.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime) 
31
+  (17.6ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
32
+  (0.1ms)  SELECT sql
33
+ FROM sqlite_master
34
+ WHERE name='index_users_on_email' AND type='index'
35
+ UNION ALL
36
+ SELECT sql
37
+ FROM sqlite_temp_master
38
+ WHERE name='index_users_on_email' AND type='index'
39
+ 
40
+  (17.0ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
41
+  (19.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
42
+  (33.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
43
+  (0.1ms) SELECT version FROM "schema_migrations"
44
+  (17.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104134543')
45
+  (18.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026231953')
46
+  (16.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
47
+  (0.1ms) select sqlite_version(*)
48
+  (18.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
49
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
+ Migrating to DeviseCreateUsers (20141026231953)
51
+  (0.1ms) begin transaction
52
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime)
53
+  (0.2ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
54
+  (0.1ms) SELECT sql
55
+ FROM sqlite_master
56
+ WHERE name='index_users_on_email' AND type='index'
57
+ UNION ALL
58
+ SELECT sql
59
+ FROM sqlite_temp_master
60
+ WHERE name='index_users_on_email' AND type='index'
61
+
62
+  (0.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
63
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141026231953"]]
64
+  (18.9ms) commit transaction
65
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
+  (0.1ms)  SELECT sql
67
+ FROM sqlite_master
68
+ WHERE name='index_users_on_reset_password_token' AND type='index'
69
+ UNION ALL
70
+ SELECT sql
71
+ FROM sqlite_temp_master
72
+ WHERE name='index_users_on_reset_password_token' AND type='index'
73
+ 
74
+  (0.1ms) SELECT sql
75
+ FROM sqlite_master
76
+ WHERE name='index_users_on_email' AND type='index'
77
+ UNION ALL
78
+ SELECT sql
79
+ FROM sqlite_temp_master
80
+ WHERE name='index_users_on_email' AND type='index'
81
+
82
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
83
+ Migrating to CreateTwoFactorAuthRegistrations (20141224135949)
84
+  (0.1ms) begin transaction
85
+  (0.4ms) CREATE TABLE "two_factor_auth_registrations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login_id" integer NOT NULL, "login_type" varchar(255) NOT NULL, "key_handle" blob(65) NOT NULL, "public_key" blob(10240) NOT NULL, "certificate" blob(1048576) DEFAULT x'' NOT NULL, "counter" integer(5) DEFAULT 0 NOT NULL, "last_authenticated_at" datetime NOT NULL, "created_at" datetime, "updated_at" datetime) 
86
+  (0.1ms) select sqlite_version(*)
87
+  (0.2ms) CREATE INDEX "index_two_factor_auth_registrations_on_login_id_and_login_type" ON "two_factor_auth_registrations" ("login_id", "login_type")
88
+  (0.1ms) SELECT sql
89
+ FROM sqlite_master
90
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
91
+ UNION ALL
92
+ SELECT sql
93
+ FROM sqlite_temp_master
94
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
95
+
96
+  (0.2ms) CREATE INDEX "index_two_factor_auth_registrations_on_key_handle" ON "two_factor_auth_registrations" ("key_handle")
97
+  (0.1ms) SELECT sql
98
+ FROM sqlite_master
99
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
100
+ UNION ALL
101
+ SELECT sql
102
+ FROM sqlite_temp_master
103
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
104
+
105
+  (0.1ms)  SELECT sql
106
+ FROM sqlite_master
107
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
108
+ UNION ALL
109
+ SELECT sql
110
+ FROM sqlite_temp_master
111
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
112
+ 
113
+  (0.2ms) CREATE INDEX "index_two_factor_auth_registrations_on_last_authenticated_at" ON "two_factor_auth_registrations" ("last_authenticated_at")
114
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141224135949"]]
115
+  (247.2ms) commit transaction
116
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
117
+  (0.2ms) SELECT sql
118
+ FROM sqlite_master
119
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
120
+ UNION ALL
121
+ SELECT sql
122
+ FROM sqlite_temp_master
123
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
124
+
125
+  (0.2ms)  SELECT sql
126
+ FROM sqlite_master
127
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
128
+ UNION ALL
129
+ SELECT sql
130
+ FROM sqlite_temp_master
131
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
132
+ 
133
+  (0.2ms) SELECT sql
134
+ FROM sqlite_master
135
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
136
+ UNION ALL
137
+ SELECT sql
138
+ FROM sqlite_temp_master
139
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
140
+
141
+  (0.1ms)  SELECT sql
142
+ FROM sqlite_master
143
+ WHERE name='index_users_on_reset_password_token' AND type='index'
144
+ UNION ALL
145
+ SELECT sql
146
+ FROM sqlite_temp_master
147
+ WHERE name='index_users_on_reset_password_token' AND type='index'
148
+ 
149
+  (0.1ms) SELECT sql
150
+ FROM sqlite_master
151
+ WHERE name='index_users_on_email' AND type='index'
152
+ UNION ALL
153
+ SELECT sql
154
+ FROM sqlite_temp_master
155
+ WHERE name='index_users_on_email' AND type='index'
156
+
157
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
158
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
159
+  (0.1ms)  SELECT sql
160
+ FROM sqlite_master
161
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
162
+ UNION ALL
163
+ SELECT sql
164
+ FROM sqlite_temp_master
165
+ WHERE name='index_two_factor_auth_registrations_on_last_authenticated_at' AND type='index'
166
+ 
167
+  (0.1ms) SELECT sql
168
+ FROM sqlite_master
169
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
170
+ UNION ALL
171
+ SELECT sql
172
+ FROM sqlite_temp_master
173
+ WHERE name='index_two_factor_auth_registrations_on_key_handle' AND type='index'
174
+
175
+  (0.1ms)  SELECT sql
176
+ FROM sqlite_master
177
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
178
+ UNION ALL
179
+ SELECT sql
180
+ FROM sqlite_temp_master
181
+ WHERE name='index_two_factor_auth_registrations_on_login_id_and_login_type' AND type='index'
182
+ 
183
+  (0.1ms) SELECT sql
184
+ FROM sqlite_master
185
+ WHERE name='index_users_on_reset_password_token' AND type='index'
186
+ UNION ALL
187
+ SELECT sql
188
+ FROM sqlite_temp_master
189
+ WHERE name='index_users_on_reset_password_token' AND type='index'
190
+
191
+  (0.2ms)  SELECT sql
192
+ FROM sqlite_master
193
+ WHERE name='index_users_on_email' AND type='index'
194
+ UNION ALL
195
+ SELECT sql
196
+ FROM sqlite_temp_master
197
+ WHERE name='index_users_on_email' AND type='index'
198
+