Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError (undefined method `expired?' for nil:NilClass) #160

Open
aarthi-mallow opened this issue Aug 19, 2022 · 6 comments
Open

NoMethodError (undefined method `expired?' for nil:NilClass) #160

aarthi-mallow opened this issue Aug 19, 2022 · 6 comments

Comments

@aarthi-mallow
Copy link

Screen Shot 2022-08-19 at 5 47 27 PM

NoMethodError (undefined method `expired?' for nil:NilClass) in V1.7.3. Works fine in older versions.

@espen
Copy link

espen commented Sep 5, 2022

This could be the same as this: stevenkaras/omniauth-mailchimp#8

@disaacs-sm
Copy link

disaacs-sm commented Dec 15, 2022

Was this ever resolved? I don't see it as being related to stevenkaras/omniauth-mailchimp#8, because that issue involves the refresh token not be set, not the access token.

We are seeing exactly the same issue with Slack. Reverting to v1.7.2 fixes the issue.

@Timrael
Copy link

Timrael commented Mar 22, 2023

Has it been fixed? I face the same issue

@BobbyMcWho
Copy link
Member

PRs are welcome

@anupama-kumari
Copy link

Can i work on this?

@Saoma1
Copy link

Saoma1 commented May 19, 2023

Make sure that you are building your link correctly.
I was seeing the same error, undefined method 'expired?' for nil:NilClass until I fixed my link_to url

route:
get 'auth/google_oauth2/callback', to: 'omniauth_callbacks#create'

wrong link:

view:
 <%= link_to "Sign in with Google", '/auth/google_oauth2/callback', method: :post, data: {turbo: false} %>

correct link:

view:
 <%= link_to "Sign in with Google", '/auth/google_oauth2', method: :post, data: {turbo: false} %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants