{"repo":"AzMoo/django-okta-auth","free":true,"listed":false,"github":"https://github.com/AzMoo/django-okta-auth","clone":"git clone https://github.com/AzMoo/django-okta-auth.git","description":"Django Okta Auth is a library that acts as a client for the Okta OpenID Connect provider.","language":"Python","stars":34,"topics":["django","python3","python","okta-oidc","okta","okta-api","authentication","authorization"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Django Okta Auth Overview Django Okta Auth is a library that acts as a client for the Okta OpenID Connect provider. The library provides a set of views for login, logout and callback, an auth backend for authentication, a middleware for token verification in requests, and a decorator that can be selectively applied to individual views. It's heavily influenced by okta-django-samples but there's a few fundamental changes and further implementation of things like refresh tokens which weren't initially implemented. This project is in no way affiliated with Okta. Installation Install from PyPI: pip install django-okta-auth Configuration Install the App Add okta oauth2.apps.OktaOauth2Config to INSTALLED APPS : Authentication Backend You will need to install the authentication backend. This extends Django's default ModelBackend which uses the configured database for user storage, but overrides the authenticate method to accept the auth code returned by Okta's /authorize API endpoint as documented here. The Authentication Backend should be configured as so: Using the middleware You can use the middleware to check for valid tokens during ever refresh and automatically refresh tokens when they expire. By using the middleware you are defaulting to requiring authentication on all your views unless they have been marked as public in PUBLIC NAMED URLS or PUBLIC URLS . The order of middleware is important and the OktaMiddleware must be below the SessionMiddleware and AuthenticationMiddlewar","default_branch":null,"files":null,"tree":[],"storefront":"/r/AzMoo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AzMoo/django-okta-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}