Sha256: 53c5f103aede250efea8dd69dc8870d8653b3e7a5e55cf56b5f8fd342e43dc83

Contents?: true

Size: 379 Bytes

Versions: 29

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true

module Shimmer
  module Auth
    class DevProvider < Provider
      def login(email:, user_agent: nil, ip: nil)
        user = model.find_or_create_by!(email: email)
        device = user.devices.create! user_agent: user_agent
        log_login(user, device_id: device.id, user_agent: user_agent, ip: ip)
        device
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
shimmer-0.0.41 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.40 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.39 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.38 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.37 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.36 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.35 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.34 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.33 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.32 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.31 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.30 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.29 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.28 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.27 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.26 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.25 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.24 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.23 lib/shimmer/auth/dev_provider.rb
shimmer-0.0.22 lib/shimmer/auth/dev_provider.rb