Comparing ACSView / FinishACSView and Headless SSO endpoint #3843
Replies: 4 comments 3 replies
-
The ACSView is the view handling the redirect from the IdP to the RP/SP. The headless endpoint initiates the redirect from the RP/SP to the IdP: So the flow is:
|
Beta Was this translation helpful? Give feedback.
-
Btw:
The headless implementation is out of beta, it's no longer a WIP. It is definitely new though... |
Beta Was this translation helpful? Give feedback.
-
Do you mean the IdP to redirects to the "backend" or template-view-base url created by Is this URL set on the IdP's SSO configuration? Then, the We use a different subdomain for backend requests. It seems like for a brief moment the user would see this domain before being redirected to the frontend domain but ultimately be authenticated correctly. Does that sound correct? In summary, IIUC, the headless version still uses the existing allauth urls to process and redirect the user. So, the auth process does require these to be surfaced even if only briefly. I had, I think been expecting "it all to happen in the frontend" but that is perhaps too complex and unnecessary.
Got it. Its awesome you've delivered it, and I'd much prefer to use it than rolling my own here. Here's a screen cap of that config on today's Google Admin page for Service Provider Details, presumably I'd want the backend |
Beta Was this translation helpful? Give feedback.
-
The IdP is redirecting to the backend, yes. That is unavoidable, as for many providers a POST is involved which cannot be handled nor forwarded from the frontend side. |
Beta Was this translation helpful? Give feedback.
-
It looks like in the beta that the SSO redirection is handled in a single endpoint.
I don't understand how the old way, the
ACSView
->FinishACSView
views are now represented in the new headless version.I have been able to prove our intended SSO/SAML via google config works using Allauth's traditional template view-based SocialApp workflow.
I could not tell if the headless SSO endpoint covers our use case. It seemed like replicating the allauth socialapp (saml) old django view behavior via the frontend might be "safer."
Because we need headless auth via allauth's SSO, (SAML specifically) as soon as possible and the headless implementation is so new and presumably still a WIP.
Here's a workflow that would be a "headless" use of allauth sso/saml using old view code:
/auth/acs-sso/
ACSView
./auth/acs-sso/finish
that completes the social login and returns the now valid auth sessionHowever, I haven't been able to make this work yet.
I could use some feedback on if and how the new headless socialapp webhook works in one step. Or if it doesn't handle the SSO/Saml use case, if the workflow above makes any sense at all as a workaround.
Before the headless project was announced I had personally implemented headless auth endpoints for login, logout, password reset, invite workflows, etc. So, I've pulled off some of this before.
And I was surprised and delighted about the grant and @pennersr efforts to extend allauth work for so many more use cases and make much of that work unnecessary for others.
Beta Was this translation helpful? Give feedback.
All reactions