Sha256: 91f19a4314f8c0ce3a81645513dc568d9892da18b4c70aaa493843653cb6e258

Contents?: true

Size: 479 Bytes

Versions: 28

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

module Shimmer
  module Auth
    class GoogleProvider < Provider
      self.token_column = :google_id

      private

      def request_details(params)
        payload = GoogleIDToken::Validator.new.check(params[:credential], Config.instance.google_client_id!)
        UserDetails.new token: payload["sub"], email: payload["email"], first_name: payload["given_name"].presence, last_name: payload["family_name"].presence
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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