OAuth
This guide explains how to set up OAuth authentication for Flagsmith using Google and GitHub as identity providers. OAuth allows your users to log in to Flagsmith using their existing credentials from these services.
Prerequisites
- Administrative access to your Flagsmith instance to configure environment variables and Flagsmith on Flagsmith flags.
- An account with Google Cloud Console and/or GitHub with permissions to create OAuth applications.
Configure OAuth for Google
Follow these steps to set up OAuth with Google:
- Follow Google's official guide on Setting up OAuth 2.0 to create your OAuth 2.0 client ID and client secret.
- Create the Flagsmith on Flagsmith flag as detailed in the deployment documentation.
Configure OAuth for GitHub
As a pre-requisite for this configuration make sure to have Flagsmith on Flagsmith set up. Follow these steps to set up OAuth with GitHub:
-
Configure the following environment variables:
GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET
-
Configure OAuth for GitHub:
- Create an OAuth GitHub application
- For the Authorization callback URL use:
https://<your flagsmith domain name>/oauth/github
-
Create the Flagsmith on Flagsmith flag as it shows here.
Now you would be able to see the GitHub SSO option.

See Also
- Flagsmith Deployment Documentation: For detailed information on setting up "Flagsmith on Flagsmith" and related configurations.
- SAML SSO: For information on configuring SAML-based SSO.