Skip to content

Breaking changes from oauth2 v2 - #8

Open
espen wants to merge 1 commit into
stevenkaras:masterfrom
espen:fix_oauth2
Open

Breaking changes from oauth2 v2#8
espen wants to merge 1 commit into
stevenkaras:masterfrom
espen:fix_oauth2

Conversation

@espen

@espen espen commented Aug 26, 2022

Copy link
Copy Markdown

Fixes #7

Comment thread lib/omniauth/strategies/mailchimp.rb Outdated
}

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

Copy link
Copy Markdown
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

ur5us commented Sep 16, 2022

Copy link
Copy Markdown

@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