-
Notifications
You must be signed in to change notification settings - Fork 683
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
Fetch access scope via #dig in callback controller #1210
Conversation
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.
Thank you for this! Can confirm this results in an error currently for Omniauth mocks
(Also can confirm that this change fixes the resulting errors)
@kirillplatonov you'll need to sign the CLA in order to contribute to the gem. |
@rezaansyed Already signed CLA but the check not updated. Do I need to do anything else? |
🤔 Hmm, try pushing up an empty commit to re-trigger the CLI? |
d381e58
to
440484c
Compare
440484c
to
c996e33
Compare
Done. CLA check is green now. |
@kirillplatonov we pushed a fix so that the builds can run. Could you rebase your fork and push that up again? |
c996e33
to
2f2a14f
Compare
@rezaansyed Done. All green now. |
2f2a14f
to
50f3598
Compare
50f3598
to
3afecf2
Compare
@kirillplatonov thanks again for the fix! We've shipped this to the latest 17.1.1 version |
Problem
After upgrading to v17.1.0 I noticed that controller tests are not passing. I use OmniAuth mock in controller tests to login as shop:
This code started raising an error:
![CleanShot 2021-03-11 at 12 48 56@2x](https://user-images.githubusercontent.com/839922/110768331-33ab3500-8268-11eb-87be-6c34afc0776b.png)
What this PR does
Changes the syntax for fetching access_scope in CallbackController to be tolerant to empty
auth_hash['extra']
.Hash#dig
is supported since Ruby 2.3 so it shouldn't break anything (since the library requires ruby >= 2.5).