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

Fix missing PKCE field #321

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Fix missing PKCE field #321

merged 2 commits into from
Feb 6, 2024

Conversation

king-jam
Copy link
Contributor

@king-jam king-jam commented Feb 2, 2024

PKCE support only had the code_verifier portion on the get_access_token method. While possible to use extras_params for this, PKCE is becoming more mainstream so making it a first class field.

Copy link
Owner

@frankie567 frankie567 left a comment

Choose a reason for hiding this comment

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

Makes total sense @king-jam, thank you 👏 I've added a few minor comments :)

docs/oauth2.md Outdated
@@ -29,6 +29,8 @@ Returns the authorization URL where you should redirect the user to ask for thei
* `redirect_uri: str`: Your callback URI where the user will be redirected after the service prompt.
* `state: str = None`: Optional string that will be returned back in the callback parameters to allow you to retrieve state information.
* `scope: Optional[List[str]] = None`: Optional list of scopes to ask for.
* `code_challenge: Optional[str] = None`: Optional code_challenge in a [PKCE context](https://datatracker.ietf.org/doc/html/rfc7636).
* `code_challenge_method: ptional[str] = None`: Optional code_challenge_method in a [PKCE context](https://datatracker.ietf.org/doc/html/rfc7636).
Copy link
Owner

Choose a reason for hiding this comment

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

typo: Optional

@@ -100,6 +100,8 @@ async def get_authorization_url(
redirect_uri: str,
state: Optional[str] = None,
scope: Optional[List[str]] = None,
code_challenge: Optional[str] = None,
code_challenge_method: Optional[str] = None,
Copy link
Owner

Choose a reason for hiding this comment

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

Could you we type it as Literal['plain', 'S256']?

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (07f2e8a) 100.00% compared to head (1fba51e) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #321   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          486       490    +4     
=========================================
+ Hits           486       490    +4     

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

@frankie567 frankie567 merged commit 33d9ec7 into frankie567:master Feb 6, 2024
7 checks passed
@frankie567
Copy link
Owner

Thank you @king-jam 🙏

@all-contributors add @king-jam for code

Copy link
Contributor

@frankie567

I've put up a pull request to add @king-jam! 🎉

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