authentication-zero 2.16.21 → 2.16.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/templates/migrations/create_security_keys_migration.rb.tt +2 -4
- data/lib/generators/authentication/templates/migrations/create_users_migration.rb.tt +4 -9
- data/lib/generators/authentication/templates/models/user.rb.tt +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92a96efa7edf8438760960d32bc93e431f786889e95fd9a92343c96a19617edb
|
4
|
+
data.tar.gz: 8ae66c2b5b556df1281e8c49dd1c6879bbe118af1617838725f3dd7d251457fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f153adacde895b01bf833726d3cfa4339cbe9665a60cc06ca0140b0fe64832c087f7c2b6ec139040cf6751def4ff0d2d5537576412adb02146fdd5c234e4ca
|
7
|
+
data.tar.gz: 87c0513ffa13f295c78fd054c12ee8d3e79f17464def8174394b0751915ae3f0777e3132b2cd3a0feb3c028118843b7473425513bb0534f726a1c9ab2ca51a51
|
data/Gemfile.lock
CHANGED
data/lib/generators/authentication/templates/migrations/create_security_keys_migration.rb.tt
CHANGED
@@ -2,12 +2,10 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
|
|
2
2
|
def change
|
3
3
|
create_table :security_keys do |t|
|
4
4
|
t.references :user, null: false, foreign_key: true
|
5
|
-
t.string :name,
|
6
|
-
t.string :external_id, null: false
|
5
|
+
t.string :name, null: false
|
6
|
+
t.string :external_id, null: false, index: { unique: true }
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
|
11
|
-
add_index :security_keys, :external_id, unique: true
|
12
10
|
end
|
13
11
|
end
|
@@ -1,27 +1,22 @@
|
|
1
1
|
class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
2
2
|
def change
|
3
3
|
create_table :users do |t|
|
4
|
-
t.string :email, null: false
|
4
|
+
t.string :email, null: false, index: { unique: true }
|
5
5
|
t.string :password_digest, null: false
|
6
6
|
|
7
7
|
t.boolean :verified, null: false, default: false
|
8
8
|
<%- if two_factor? %>
|
9
9
|
t.string :otp_secret
|
10
10
|
<%- end -%>
|
11
|
+
<%- if webauthn? %>
|
12
|
+
t.string :webauthn_id
|
13
|
+
<%- end -%>
|
11
14
|
<%- if omniauthable? %>
|
12
15
|
t.string :provider
|
13
16
|
t.string :uid
|
14
17
|
<%- end -%>
|
15
|
-
<%- if webauthn? %>
|
16
|
-
t.string :webauthn_id
|
17
|
-
<%- end -%>
|
18
18
|
|
19
19
|
t.timestamps
|
20
20
|
end
|
21
|
-
|
22
|
-
add_index :users, :email, unique: true
|
23
|
-
<%- if omniauthable? -%>
|
24
|
-
add_index :users, [:provider, :uid], unique: true
|
25
|
-
<%- end -%>
|
26
21
|
end
|
27
22
|
end
|