Sha256: cdbe8da3642e1f7cd5c9d97f892db389ac843596e83f92d93f910764ec5d431f

Contents?: true

Size: 746 Bytes

Versions: 2

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Lokalise < OmniAuth::Strategies::OAuth2
      option :name, 'lokalise'

      option :client_options, {
        site: 'https://app.lokalise.com',
        authorize_url: 'oauth2/auth',
        token_url: 'oauth2/token',
        grant_type: 'authorization_code'
      }

      uid { nil }

      info do
        {
          # :name => raw_info['name'],
          # :email => raw_info['email']
        }
      end

      extra do
        {
          'raw_info' => raw_info
        }
      end

      def raw_info
        # @raw_info ||= access_token.get('/me').parsed
        {}
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-lokalise-0.1.0 lib/omniauth/strategies/lokalise.rb
omniauth-lokalise-0.0.1 lib/omniauth/strategies/lokalise.rb