jrd / django-oauth2-authcodeflow

Authenticate with any OpenId Connect/Oauth2 provider through authorization code flow. PKCE is also supported
https://pypi.org/project/django-oauth2-authcodeflow/
MIT License
14 stars 7 forks source link

Minor changes for the integration of Azure B2C #3

Closed thibaultfalque closed 3 years ago

thibaultfalque commented 3 years ago

Azure B2C does not offer a termination point for user (see the oidc configuration here).

This pull request proposes a new variable OIDC_IGNORE_USERINFO_URL in order to ignore this endpoint and use directly the Azure B2C return that contains the user's information (once decoded).

It also adds a variable OIDC_EMAIL_CLAIM_KEY to specify the key for the email because for Azure B2C it's not email but emails.

Links:

jrd commented 3 years ago

Hi and thank you for your contribution.

Seems like nice changes.

I would like to accept your merge request but could you review your commits to submit only what has changed on not cosmetic/linter adjustments you made please?

There is a flake8 configuration is setup.cfg, please comply with it.

thibaultfalque commented 3 years ago

Yes of course I will do that. Sorry my IDE applies these changes naturally.

jrd commented 3 years ago

I cleaned up the code and integrates the modification in another MR.

jrd commented 3 years ago

Tell me @thibaultfalque if this is ok for you. I also made a release (0.3.0)

thibaultfalque commented 3 years ago

Hello,

Yes it's ok for me.