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

Breaking changes from oauth2 v2 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

espen
Copy link

@espen espen commented Aug 26, 2022

Fixes #7

}

option :auth_token_params, {
:expires_at => 1.minute.from_now
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be no way to tell omniauth-oauth2 that there is no refresh_token. There might be a better way than setting expires_at like this though.

@ur5us
Copy link

ur5us commented Sep 16, 2022

@espen Thanks for sharing your solution. It works for me, though I use a 1 year expiry which is plenty in my case. In general, using .year.from_now won’t work for this library though I’d presume as it relies on ActiveSupport extensions to Integer. Other than that I’m not sure either whether there’s a better way. Looking at the Ruby example for Mailchimp’s OAuth2 flow (https://mailchimp.com/developer/marketing/guides/access-user-data-oauth-2/) they do not provide an expiry param but it’s hard to tell whether they’re simply not adhering to the spec or whether it’s an issue with omniauth, oauth2, omniauth-oauth2 or this gem here.

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

Successfully merging this pull request may close these issues.

OAuth2::Error invalid_client: client_id parameter missing being thrown before callback
2 participants