From 0e86aca7d80e2fd64e0b0645feee10c591a563e9 Mon Sep 17 00:00:00 2001 From: Ozmar Ugarte Date: Thu, 29 Sep 2022 16:42:43 -0500 Subject: [PATCH] fixup! Send access_token_class as client option --- lib/omniauth-slack/oauth2/client.rb | 2 +- lib/omniauth/strategies/slack.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/omniauth-slack/oauth2/client.rb b/lib/omniauth-slack/oauth2/client.rb index 5b08159..077cdad 100644 --- a/lib/omniauth-slack/oauth2/client.rb +++ b/lib/omniauth-slack/oauth2/client.rb @@ -49,7 +49,7 @@ def initialize(*args, **options) # Wraps OAuth2::Client#get_token to pass in the omniauth-slack AccessToken class. def get_token(params, access_token_opts = {}) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength debug{"params #{params}, access_token_opts #{access_token_opts}"} - rslt = super(params, access_token_opts, access_token_class) + rslt = super(params, access_token_opts) debug{"Client #{self} built AccessToken #{rslt}"} rslt end diff --git a/lib/omniauth/strategies/slack.rb b/lib/omniauth/strategies/slack.rb index 0b2917b..22c756c 100644 --- a/lib/omniauth/strategies/slack.rb +++ b/lib/omniauth/strategies/slack.rb @@ -40,9 +40,9 @@ class Slack < OmniAuth::Strategies::OAuth2 # OAuth2::Client options. option :client_options, { + access_token_class: OmniAuth::Slack::OAuth2::AccessToken, auth_scheme: :basic_auth, authorize_url: '/oauth/v2/authorize', - extract_access_token: OmniAuth::Slack::OAuth2::AccessToken, history: Array.new, raise_errors: false, # MUST be false to allow Slack's get-token response from v2 API. site: 'https://slack.com',