-
Notifications
You must be signed in to change notification settings - Fork 414
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
Support oauth2 v2.0.6+ #429
Conversation
- apply changes to test suite for new parameters in OAuth::Client and AccessToken - update access_token['id_token'] to access_token.token in strategies/google_oauth2.rb - alter access_token.token.nil? to nil_or_empty() due to aforementioned changes
- alter test "...when the access token is empty or nil" - v2.0.6 fixed regression in v2.0.5 so test client is now initialized with refresh_token
- update test "...when the access token is empty or nil" - remove redundant "let(:client) do" declaration
- allow OAuth::Client initializations to raise error flags
- convert unnecessary "let(:client) do" to instance variable
omniauth-google-oauth2.gemspec
Outdated
@@ -9,8 +9,8 @@ Gem::Specification.new do |gem| | |||
gem.name = 'omniauth-google-oauth2' | |||
gem.version = OmniAuth::GoogleOauth2::VERSION | |||
gem.license = 'MIT' | |||
gem.summary = %(A Google OAuth2 strategy for OmniAuth 1.x) | |||
gem.description = %(A Google OAuth2 strategy for OmniAuth 1.x. This allows you to login to Google with your ruby app.) | |||
gem.summary = %(A Google OAuth2 strategy for OmniAuth 2.x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed, not sure why all these PR's had the same incorrect change. =\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went ahead and made the correction. My original PR was based off of the other PR that didn't pass testing and I completely overlooked this more subtle mistake while focusing on the build breaking changes that were included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR I was building off of for reference
This looks great, should be mergeable once the OmniAuth version change is reverted. |
@JacobMarq Now I'm receiving |
@wbotelhos Sounds similar to an issue another user was having #430. A recent PR #431, merged shortly after your comment, should fix things for you. If you are still experiencing any problems, I'd be happy to help! |
@JacobMarq I had the same error as @wbotelhos and version 1.1.1 fixed it. |
It worked, @JacobMarq . Thanks! :) |
Solves issue #425 to provide complete support for latest version v2.0.6+
!! Breaking changes for OAuth2 versions <2.0.6
Reasons for changes
OAuth2 v2.0.5 introduced a breaking change.
addressed with the following changes:
As well as a regression that prevents initializing AccessToken without 'id_token':
Fixed for refresh_token work flows in v2.0.6:
This code led to multiple test failures that required the following changes:
I am open to and appreciate any feedback on the changes.