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

make request token method Trelll compatible #832

Conversation

bs-bhagirath-radadiya
Copy link

@bs-bhagirath-radadiya bs-bhagirath-radadiya commented Sep 22, 2023

if social auth for Trello then scope arguments are not getting for the request token method

Copy link
Member

@nijel nijel left a comment

Choose a reason for hiding this comment

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

Can you please describe what issue are you trying to address?

@@ -247,7 +247,8 @@ def request_token_extra_arguments(self):
def unauthorized_token(self):
"""Return request for unauthorized token (first stage)"""
params = self.request_token_extra_arguments()
params.update(self.get_scope_argument())
if self.name not in ['trello']:
params.update(self.get_scope_argument())
Copy link
Member

Choose a reason for hiding this comment

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

If this is really needed, overriding get_scope_argument in TrelloOAuth is the way to go.

Copy link
Author

@bs-bhagirath-radadiya bs-bhagirath-radadiya Sep 22, 2023

Choose a reason for hiding this comment

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

Trello REQUEST_TOKEN_URL (https://trello.com/1/OAuthGetRequestToken) does not take any arguments.

If we send the scope here then the URL looks like this https://trello.com/1/OAuthGetRequestToken?scope=read,write

As per above mentioned Trello request does not take any arguments in REQUEST_TOKEN_URL. Trello gives an error like this...

ERROR: 400 Client Error: Bad Request for URL: https://trello.com/1/OAuthGetRequestToken?scope=read%2Cwrite

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, this should go as a comment to the code. And the implementation should override get_scope_argument method in TrelloOAuth instead of doing changes in generic OAuth backend.

@bs-bhagirath-radadiya bs-bhagirath-radadiya changed the title comment scope in unauthorized_token function of oauth file make request token method Trelll compatible Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.01% ⚠️

Comparison is base (ca841a0) 77.11% compared to head (00a9bb0) 77.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #832      +/-   ##
==========================================
- Coverage   77.11%   77.11%   -0.01%     
==========================================
  Files         337      337              
  Lines       10262    10263       +1     
  Branches      690      691       +1     
==========================================
  Hits         7914     7914              
  Misses       2192     2192              
- Partials      156      157       +1     
Flag Coverage Δ
unittests 77.11% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
social_core/backends/oauth.py 85.66% <50.00%> (-0.32%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nijel
Copy link
Member

nijel commented Jan 26, 2024

Closing as review feedback was not addressed.

@nijel nijel closed this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants