Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openid connect provider and client example in django

I need to build a Django web-app. My web-app needs to support authentication and authorization using OpenID Connect. It is my first time doing this. Is there a free Identity Provider to test my application or do I need to write the provider and the client? My task is to write only the client that connects to the provider. An example would be great or some course/tutorial I can use to learn how to do this. Maybe there are no good examples in Django but I know ASN.NET and Java so those examples could inspire me as well.

like image 647
Flavius Avatar asked Sep 14 '25 00:09

Flavius


1 Answers

There are a bunch of OpenID Connect providers you can use to test your client: you can sign up for a free Auth0 or Okta developer sandbox, download and run IdentityServer locally, or try the OAuth2 Playground.

As for writing the client. Please don't write your own. There are a list of libraries from the OpenId Foundation. I've used pyoidc for a non Django application, you could hook that in to your app, or use one of the Django specific OpenID Connect libraries.

like image 71
tankthinks Avatar answered Sep 16 '25 14:09

tankthinks