import{_ as e,c as a,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1720539149000}'),o={name:"en_US/guide/q8.md"},c=t(`
If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.
Oauth2:
Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
Endpoint: "https://xxxxx.cloudflareaccess.com"
Type: cloudflare
Parameter | Retrieval Method |
---|---|
Admin | My Team -> Users -> <specific user> -> User ID |
ClientID/ClientSecret | Access -> Application -> Add an Application -> SaaS -> OIDC |
Endpoint | Access -> Application -> Application URL -> Only keep the protocol and domain, no path |
Go to Zero Trust Dashboard: https://one.dash.cloudflare.com
My Team
-> Users
-> <specific user>
-> Get User ID
and save it;Access
-> Application
-> Add an Application
;SaaS
, enter a custom application name (e.g., nezha) in Application
, select OIDC
, and click Add application
;Scopes
, select openid
, email
, profile
, groups
;Redirect URLs
, such as https://dashboard.example.com/oauth2/callback
;Client ID
, Client Secret
, and the protocol and domain part of the Issuer
URL, such as https://xxxxx.cloudflareaccess.com
;/opt/nezha/dashboard/data/config.yaml
), modify the Oauth2
configuration according to the example configuration, and restart the Dashboard service.After completing the Dashboard setup, you also need to configure the authentication policy in the Zero Trust Dashboard: Access
-> Applications
-> <application name>
-> Policies
. You can choose from over ten SSO authentication methods, including email OTP verification, hardware key verification, etc. For detailed configuration, please refer to the Cloudflare Zero Trust documentation.