Open corvis opened 11 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is actually still a relevant problem. Can someone take a look please?
Having a similar issue - SAML Source (Shibboleth) backend directory, OAuth SP (Gitea). Works fine if already logged into Authentik, redirects to authentik_core:if-user after completing.
@corvis - has that patch been working well for you?
Yep, I still use it
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is still a problem
Hi,
Any new on this one ? This fix still works and is still needed on 2024.10.0 .
Cheers.
Describe the bug When you have OAuth provider to authenticate your application AND saml source user can't complete the flow via SAML because at the very end they will be redirected to Authentik's user home instead of proper callback to complete OAuth on the integrated app side.
To Reproduce Steps to reproduce the behavior:
Expected behavior User is redirected to the app oauth callback url upon SAML flow completion.
Version and Deployment (please complete the following information):
Additional context After a bit of debugging and comparing SAML source behavior to OAuth source I think I figured the root cause. OAuth relies on
NEXT_ARG_NAME
residing in the session (keySESSION_KEY_GET
). However SAML has additional pre-authentication which starts a new flow and resets sessionSESSION_KEY_GET
. Despite the correct URL still exists in a Plan context nobody reads it from there.I fixed this for myself by adding a bit of logic to SAML's
ACSView
which reads redirect value from the plan context and sets it into thesession[SESSION_KEY_GET]
. Here is it: