How to Use OAuth Authorization
About 455 wordsAbout 2 min
How to Use OAuth Authorization explains how to safely authorize third-party applications to access your CNB account, and how to review or revoke that authorization.
When to use: when third-party tools such as IDE plugins, CI tools, or project management software need access to your CNB data — after authorization the app calls the API with an access token, so you never hand over your login credentials. Common integrations include:
- IDE plugins: Read code and review pull requests directly in the editor
- CI and project management tools: Read repositories, trigger builds, and sync task status
- Command-line tools: In particular CNB CLI, where one authorization grants long-term OpenAPI access
See CNB CLI for details.
Steps
1. Initiate Authorization Link
Authorization typically starts from within the third-party app: click "Connect CNB" or "Sign in with CNB", and the browser will redirect to the CNB authorization page.
2. Confirm Authorization
If not logged in to CNB, log in first. The authorization page shows the application name and requested permissions. Verify them, then click "Authorize".
3. Connection Successful
The page redirects back to the third-party app. The app now has permission to access your specified resources, and you can operate CNB resources (such as pulling code, viewing tasks) directly without logging in again.
FAQ
1. Is my information secure?
OAuth is designed to protect your account; third-party apps never see your login credentials:
- Credential Isolation: apps access data only through platform-issued access tokens, and can never obtain your CNB login credentials
- Temporary Tokens: access tokens are encrypted, time-limited, and valid only for the authorized app
- Security Monitoring: the CNB Security Center audits token usage and immediately intercepts any anomalies
2. What permissions are authorized?
Before clicking "Authorize", you can view the full permission list on the authorization page:
- Basic Info: read your avatar and nickname (usually to display the current user)
- Read-Only: the app can only view code or tasks, and cannot modify them
- Read/Write: the app can modify code, create tasks, or trigger builds
3. How to Revoke OAuth Authorization?
You can revoke authorization at any time — the action takes effect immediately:
- Log in to CNB, click your avatar in the top right corner, and select "Settings"
- Find "Authorized Applications" in the left navigation
- Find the application in the list, click "Details", then click "Revoke All Access"
Once revoked, the application can no longer access any of your data until you authorize it again.