Bytebase
Casdoor can use OAuth2 to connect various applications. In this example, we will use Bytebase to demonstrate how to use OAuth2 to connect to your applications.
The following are the configuration names:
CASDOOR_HOSTNAME
: The domain name or IP address where the Casdoor server is deployed.
Bytebase_HOSTNAME
: The domain name or IP address where Bytebase is deployed.
Step 1: Deploy Casdoor and Bytebase
Firstly, deploy Casdoor and Bytebase.
After successful deployment, make sure that:
- Casdoor can be logged in and used normally.
- You can set
CASDOOR_HOSTNAME
tohttp://localhost:8000
when deploying Casdoor inprod
mode. See production mode.
Step 2: Configure Casdoor application
- Create a new or use an existing Casdoor application.
- Find the redirect URL:
<CASDOOR_HOSTNAME>/oauth/callback
. - Add the redirect URL to the Casdoor application:
On the application settings page, you will find two values: Client ID
and Client secret
. We will use these values in the next step.
Open your favorite browser and visit: http://CASDOOR_HOSTNAME
/.well-known/openid-configuration. You will see the OIDC configuration of Casdoor.
Step 3: Configure Bytebase
- Find SSO and select OAuth 2.0:
- Configure this app:
- Find the Client ID and Client Secret on the Casdoor application page.
Token server URL
: http://CASDOOR_HOSTNAME
/api/login/oauth/access_tokenAuthorization server URL
: http://CASDOOR_HOSTNAME
/login/oauth/authorizeUser Info server URL
: http://CASDOOR_HOSTNAME
/api/get-account- Scopes:
address phone openid profile offline_access email
Log out of Bytebase and test SSO.