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

[ENG-6731] Fix zotero connection #10854

Conversation

adlius
Copy link
Collaborator

@adlius adlius commented Dec 15, 2024

Purpose

Changes

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

Comment on lines +81 to +82
'oauth_token': oauth_token,
'oauth_verifier': oauth_verifier,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to forward these oauth1a specific query params to GV

gv_url = urlunparse(urlparse(GRAVYVALET_URL)._replace(path=f'/v1/{oauth_version}/callback', query=urlencode(query_params)))
requests.get(gv_url)
requests.get(gv_url, cookies=request.cookies)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oauth1a process on GV side make use of sessions to store oauth1a_accound_id in between requests. Therefore we need to forward the cookies to GV upon callback.

Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

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

Looks good other than test failures.

=================================== FAILURES ===================================
______________ TestBitbucketAuthViews.test_oauth_finish_enable_gv ______________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
_______________ TestGitHubAuthViews.test_oauth_finish_enable_gv ________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
__________________ TestAuthViews.test_oauth_finish_enable_gv ___________________
addons/base/tests/views.py:93: in test_oauth_finish_enable_gv
    assert dict(parse_qsl(parsed_callback_url.query)) == query_params
E   AssertionError
=============================== warnings summary ===============================

@adlius adlius merged commit b2f1a2b into CenterForOpenScience:feature/gravy_valet_integration Dec 17, 2024
6 checks passed
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.

2 participants