Use sorcery for logins
This gives us more flexibility and allows us to use password authentication later. Also we don't need to build the login functionality ourself.
This commit is contained in:
15
db/migrate/20200413101920_sorcery_core.rb
Normal file
15
db/migrate/20200413101920_sorcery_core.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class SorceryCore < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :users, :crypted_password, :string
|
||||
add_column :users, :salt, :string
|
||||
add_column :users, :magic_login_token, :string
|
||||
add_column :users, :magic_login_token_expires_at, :datetime
|
||||
add_column :users, :magic_login_email_sent_at, :datetime
|
||||
|
||||
add_column :authentications, :provider, :string, null: false
|
||||
add_column :authentications, :uid, :string, null: false
|
||||
|
||||
add_index :users, :magic_login_token
|
||||
add_index :users, :email, unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user