Class: OmniAuth::Strategies::Todoist
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Todoist
- Defined in:
- lib/omniauth/strategies/todoist.rb
Instance Method Summary collapse
-
#callback_url ⇒ Object
Bugfix for regression introduced after omniauth-oauth2 v1.3.1 details: github.com/intridea/omniauth-oauth2/issues/81.
- #raw_info ⇒ Object
Instance Method Details
#callback_url ⇒ Object
Bugfix for regression introduced after omniauth-oauth2 v1.3.1 details: github.com/intridea/omniauth-oauth2/issues/81
41 42 43 |
# File 'lib/omniauth/strategies/todoist.rb', line 41 def callback_url [:callback_url] || full_host + script_name + callback_path end |
#raw_info ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/omniauth/strategies/todoist.rb', line 45 def raw_info @raw_info ||= begin params = { headers: { "Content-Type" => "application/x-www-form-urlencoded" }, body: { token: access_token.token, sync_token: "*", resource_types: '["user"]' } } access_token.post("https://api.todoist.com/sync/v8/sync", params).parsed.fetch('user', {}) end end |