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

Add AzureADOauth2 backend using the v2.0 API. #931

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

mateuszmandera
Copy link
Contributor

AzureADOAuth2 uses the v1.0 API which doesn't support personal accounts. Updating the endpoints used by the original class may break backward compatibility, so add this as just an additional subclass.

This should also fix #723

AzureADOAuth2 uses the v1.0 API which doesn't support personal accounts.
Updating the endpoints used by the original class may break backward
compatibility, so add this as just an additional subclass.
@nijel
Copy link
Member

nijel commented Aug 23, 2024

Is it needed to have two backends? Maybe just the current backend could be upgraded?

@mateuszmandera
Copy link
Contributor Author

mateuszmandera commented Aug 27, 2024

@nijel I wasn't sure if there isn't some incompatible behavior between these APIs that some old code using this backend might rely on. At least there are differences in supported scopes, e.g. in the new API you want to have the User.Read scope enabled; I believe that wasn't supported in v1.0. So if a project overrode the scopes when subclassing AzureADOAuth2, swapping the endpoint would break things for them upon upgrading social-core.

@nijel
Copy link
Member

nijel commented Aug 30, 2024

Okay, if this needs a configuration change, then a separate backend is probably the way to go. I was just wondering if this could be silently upgraded so that once 1.0 API is disabled, the backend will continue to work.

@mateuszmandera
Copy link
Contributor Author

I haven't found any information about Microsoft having a concrete plan to disable the 1.0 API, so it might also very well be that the old backend will keep working for a long time. So in my view not worth it to risk giving users trouble by possibly breaking their integration with backward incompatible behavior by swapping the endpoint.

@nijel nijel merged commit d9554fa into python-social-auth:master Sep 2, 2024
7 checks passed
@nijel
Copy link
Member

nijel commented Sep 2, 2024

Merged, thanks for your contribution!

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.

Azure Active Directory is obsolete and broken.
2 participants