GitHub
Cloudflare Zero Trust allows your team to connect to your applications using their GitHub login. Administrators can build rules for specific individuals or using GitHub organizations. You do not need to have a GitHub organization to use the integration.
Set up GitHub Access
To configure GitHub access in both GitHub and Cloudflare Zero Trust:
-
Log in to GitHub.
-
Go to your account Settings > Developer Settings, select OAuth Apps and select Register a new application. The Register a new OAuth application window displays.
-
Enter an Application name. Your users will see this name on the login page.
-
Enter your team domain in the Homepage URL field.
For example,
https://<your-team-name>.cloudflareaccess.com
-
In the GitHub Authorization callback URL field, enter your team domain and add this to the end of the path:
/cdn-cgi/access/callback
. For example:https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/callback -
Select Register application.
-
Copy the Client ID and Client Secret.
-
In Zero Trust, go to Settings > Authentication.
-
Under Login methods, select Add new.
-
Choose GitHub on the next page.
-
Paste in the Client ID and Client secret.
-
Select Save.
To test that your connection is working, go to Authentication > Login methods and select Test next to GitHub. If you have GitHub two-factor authentication enabled, you will need to first login to GitHub directly and return to Access.
Example API Configuration
{"config": {"client_id": "<your client id>","client_secret": "<your client secret>"},"type": "github","name": "my example idp"}