將以下程式碼新增到 user.rb

include OmniauthAttributesConcern

has_many :user_authentications

devise :omniauthable, :database_authenticatable, :registerable,:recoverable, :rememberable, :trackable

def self.create_from_omniauth(params)
    self.send(params.provider,params)
end