Django Rest framework as Single Sign On

483 views Asked by At

I have created DRF application with Django OAuth Toolkit (DOT) Rest Application with oAuth2 flow. I was planning to use these api's as Single Sign On (SSO). For javascript client it is working fine with "authorization_code" grant type which is returning me access token and refresh token and with those I can authorize and authenticate my javascript application.

But for another Django application I am stuck to do the same. It has its own user database and default authentication backend. I want to authenticate users with SSO user database and create a session on successful login into SSO application (DRF application in my case).

I want to achieve following:

  1. In Django Application I click on login link.
  2. It redirect me to SSO login page and ask me to provide user credentials.
  3. On successful login I redirect back to Django application and land on dashboard page after auto login.

If anybody can spare some time and let me know if I am getting wrong anywhere it will be helpful. Thank you in advance.

0

There are 0 answers