Skip to main content

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:

  1. Follow Google's official guide on Setting up OAuth 2.0 to create your OAuth 2.0 client ID and client secret.

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:

  1. Configure the following environment variables:

    • GITHUB_CLIENT_ID
    • GITHUB_CLIENT_SECRET
  2. Configure OAuth for GitHub:

  3. Create the Flagsmith on Flagsmith flag as it shows here.

Now you would be able to see the GitHub SSO option.

See Also