6

Is there a way to write the logic for both backend and frontend?

In my current flow, We are using Django rest-framework login, now we need to integrate OpenID connect SSO in our project so guide me how we can integrate OpenID connect SSO with Django-rest framework.

Is there a GitHub example? I am looking for a sample code.

Ranvijay Sachan
  • 2,407
  • 3
  • 30
  • 49

2 Answers2

6

We can use the implicit flow, I added an example of how to use OIDC with a client-side app.

Front end get access token: http://django-oidc-provider.readthedocs.io/en/develop/sections/examples.html#pure-js-client-using-implicit-flow

You also have to validate ID_TOKEN's in backend:

https://openid.net/specs/openid-connect-implicit-1_0.html#IDTokenValidation

Sample code: https://github.com/ranvijay-sachan/django-rest-login-and-social_auth

I have tested with Google open id connect for any SSO provider you can add below code using python social auth:

how can we integrate any SSO provider using python social auth openid connect?

juanifioren
  • 633
  • 5
  • 18
Ranvijay Sachan
  • 2,407
  • 3
  • 30
  • 49
2

Here it has user angualr Js with django-rest-framework-jwt

https://github.com/rmemon/Angular-JS-django-rest-framework-jwt

Rahil
  • 632
  • 6
  • 17
  • How we will integrate google OpenID connect with same.Rahil I know oauth2 flow and I am able to integrate oauth2 but here I have different requirement please suggest if you have any idea. Thanks. – Ranvijay Sachan Dec 07 '16 at 12:09
  • 1
    I will Update on it very soon, Thanks -- ranvijay – Rahil Dec 07 '16 at 13:03