Skip to content

Omniauth-oauth2 v.1.8.0 Causes "undefined method `expired?'" #22

@kevinneub

Description

@kevinneub

I had the following in my Gemfile...
gem 'omniauth-oauth2', '~> 1.7'

After a bundle update omniauth-oauth2 went from v.1.7.3 -> 1.8.0

That caused errors when authenticating with Slack as follows...
D, [2022-09-07T18:08:29.046543 #42987] DEBUG -- omniauth: (slack_chiirp) Callback phase initiated.
OAuth2::Client#get_token argument extract_access_token will be removed in oauth2 v3. Refactor to use access_token_class on #initialize.
D, [2022-09-07T18:08:29.047586 #42987] DEBUG -- omniauth: (slack) API request '[:post, "https://slack.com/api/oauth.v2.access"]'.
E, [2022-09-07T18:08:29.200274 #42987] ERROR -- omniauth: (slack_chiirp) Authentication failure! undefined method expired?' for nil:NilClass self.access_token = access_token.refresh! if access_token.expired? ^^^^^^^^^: NoMethodError, undefined method expired?' for nil:NilClass
self.access_token = access_token.refresh! if access_token.expired?

Let me know if any other info is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions