Sha256: 1bd021d9b139756125d3ddfdb6c58ded57f6f85ac3eba870ba3fcfad997fd1b3
Contents?: true
Size: 522 Bytes
Versions: 29
Compression:
Stored size: 522 Bytes
Contents
# frozen_string_literal: true module Shimmer module Auth module User extend ActiveSupport::Concern included do def authenticate!(user_agent: nil, ip: nil) Provider.new(self.class).create_device(user: self, user_agent: user_agent, ip: ip) end end class_methods do def login!(provider:, **attributes) "Shimmer::Auth::#{provider.to_s.classify}Provider".constantize .new(self).login(**attributes) end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems