lib/omniauth/strategies/linear.rb in omniauth-linear-1.0.2 vs lib/omniauth/strategies/linear.rb in omniauth-linear-1.0.3

- old
+ new

@@ -28,14 +28,14 @@ end end end end - uid { me.viewer.id } + uid { "#{me['organization']['id']}-#{me['viewer']['id']}" } extra do - { raw_info: raw_info, me: me.viewer } + { raw_info: raw_info, me: me['viewer'], organization: me['organization'] } end def raw_info @raw_info ||= {} end @@ -51,25 +51,29 @@ client = GraphQL::Client.new(schema: schema, execute: http) client.allow_dynamic_queries = true gql = client.parse <<~GRAPHQL query { + organization { + id + name + } viewer { id name email } } GRAPHQL response = client.query(gql, context: {token: access_token.token}) - response.data + response.data.to_h end end def callback_url full_host + script_name + callback_path end end end end -OmniAuth.config.add_camelization 'linear', 'Linear' \ No newline at end of file +OmniAuth.config.add_camelization 'linear', 'Linear'