Skip to content

Incompatible with social-auth-app-django 6+ #561

Description

@pwnage101

TL;DR:

Users can no longer log in to IDAs (via JWT) that pair this library with social-auth-app-django 6.0+ / social-auth-core 5.0+: the login attempt fails fatally before reaching the identity provider.

Context

JwtRedirectToLoginIfUnauthenticatedMiddleware redirects unauthenticated users (HTTP 302) to the login URL (e.g. /login), which in turn redirects to the social-auth begin view /login/edx-oauth2/. The browser reaches that view with a GET.

In social-auth-app-django 6.0.0 (2026-06-23) / social-auth-core 5.x, the begin view now always requires POST, so that GET is rejected:

Method Not Allowed (GET): /login/edx-oauth2/

POST was opt-in via SOCIAL_AUTH_REQUIRE_POST in 5.4.0 (default off, so GET still worked); 6.0.0 made it mandatory and removed the setting.

The middleware's only override hook, get_login_url(), changes the target URL but not the HTTP method, so there is no configuration-based workaround.

Possible fix (high-level)

(Besides the workaround of just downgrading social-auth-app-django)

Make login initiation use POST instead of a 302→GET redirect, e.g.:

  1. have process_response return an auto-submitting POST form (carrying next), or
  2. redirect to a GET-accepting shim view that POSTs to the begin endpoint.

Either way, the fix seemingly lies within this edx-drf-extensions repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions