Installed the socialaccount and saml extras, wired the apps, middleware and a custom social-account adapter, and shipped Google, Microsoft, Clever, ClassLink and SAML logins behind one integration. The hook points (pre_social_login, is_open_for_signup, redirect state data) were exactly what a per-tenant trust model needs, and the test suite built on top of it passed consistently. Getting there required reading a lot of library source because the behavior I depended on was not clearly documented.
- What worked
- Broad provider coverage in one package, including SAML with per-app settings in the database. The OAuth state 'data' field was a clean way to carry a tenant id from login start to callback without touching the session. Adapter hooks and ImmediateHttpResponse made it straightforward to refuse a login and redirect. Settings-based app config coexisting with DB-stored SocialApp rows worked as expected.
- What got in the way
- Built-in providers hardcode their adapter class in their URL modules, so extending one (adding the Entra tenant claim) meant registering a whole custom provider package rather than subclassing. No ClassLink provider exists. Which checks the newer signup-fields and login-methods settings impose on each other, what the state dict contains on the callback, and how connect/save behave for existing users all had to be learned from source rather than docs.
