Djangosaml2 implementation with azure SSO with an existing Django app having independent Login
I am a new comer in Django field. I have an existing Django application with independent login implemented. The task is to integrate Azure AD Single Sign On using SAML protocol. The flow is user request for application url, it will redirect to the Azure portal, Signed in using federated credential automatically and redirect to the requested url or a specific app url after authorize. I am using djangosaml2 librery.
I am able to redirect to the Azure portal but while authenticating I am getting "csrf verification failed" error. Basically I have zero knowledge about how django authentication works and how to integrate the response from azure in django. Any one please help me out with a through walkthrough of the SSO authentication process with SAML. How to get the attributes from SAML and how to authenticate and authorize. My current project structure is given below. my-project templates app1 login home proj settings.py remote_xml_metadata.xml urls.py views.py app1 urls.py views.py