Osso is supported in Python Social Auth as a backend provider. Python Social Auth is a popular authentication and authorization mechanism for Python projects in various frameworks like Django or Flask. If you're already using Python Social Auth for other providers continue below for integrating Osso. Otherwise start with Python Social Auth's installation documentation. You can also review Osso's docs for Python Social Auth here, and view a Django example that integrates Osso here.
In order to utilize Osso as a provider with Python Social Auth, you first need to add Osso to your
The you need to configure the Osso backend with the Client ID, Client Secret and base URL from your Osso instance. First, ensure that the Osso OAuth Client you are using for this application has a redirect URI on its allow list, replacing
your-app.com with your application's domain:
Client ID and
Client Secret, and make note of your Osso URL. You need to set these values in your application. The
Client ID and
Client Secret should not be committed to version control and instead be set in your application's environment.
Depending on your application, you'll also need to set the following settings to determine where users are sent when they login, when they attempt to access a protected path without a session, and the pipeline, an extendible mechanism where you can implement functions during the authentication, association and disconnection flows:
Once your Osso backend is in place we need to provide a way for users to sign in. With SAML SSO, we need to determine who a user is in order to direct them to the proper Identity Provider for authentication.
Osso can handle that on a hosted login page, or you can have your users skip the hosted login page by collecting their email or domain yourself. An example form for collecting the user's email and kicking off authentication via Osso could look like this:
If you're using React on your front end, check out Osso's React library documentation to learn about our login form component.