Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to configure GitHub Enterprise as OAuth2 identity provider #158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,27 @@ The `CALLBACK_URL` variable is the URL that is invoked after the authorization i

The `SCOPE` variable defines the scope of the data that the OAuth provider passes on to Hoppscotch.

By default, public GitHub is used as the OAuth provider. However, an instance of Github Enterprise can also be used as the provider. To configure that, the following environment variables must be set:
- `GITHUB_AUTHORIZATION_URL`: Authorization endpoint.
- `GITHUB_TOKEN_URL`: Endpoint to retrieve access token.
- `GITHUB_USER_PROFILE_URL`: Endpoint to retrieve general user info (e.g., full name).
- `GITHUB_USER_EMAIL_URL`: Endpoint to retrieve user emails.

Sample configuration:
```yaml
# New configuration settings================================================
GITHUB_AUTHORIZATION_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/login/oauth/authorize
GITHUB_TOKEN_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/login/oauth/access_token
GITHUB_USER_PROFILE_URL=https:/{{ENTERPRISE_INSTANCE_HOST_NAME}}/api/v3/user
GITHUB_USER_EMAIL_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/api/v3/user/emails

# Configuration settings that remain unchanged in meaning=============================
GITHUB_CLIENT_ID=*****************************************
GITHUB_CLIENT_SECRET=*****************************************
GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback
GITHUB_SCOPE="user:email"
```

The links to configure OAuth for various providers are given below:

1. [**GitHub**](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) (scope: email)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,27 @@ The `CALLBACK_URL` variable is the URL that is invoked after the authorization i

The `SCOPE` variable defines the scope of the data that the OAuth provider passes on to Hoppscotch.

By default, public GitHub is used as the OAuth provider. However, an instance of Github Enterprise can also be used as the provider. To configure that, the following environment variables must be set:
- `GITHUB_AUTHORIZATION_URL`: Authorization endpoint.
- `GITHUB_TOKEN_URL`: Endpoint to retrieve access token.
- `GITHUB_USER_PROFILE_URL`: Endpoint to retrieve general user info (e.g., full name).
- `GITHUB_USER_EMAIL_URL`: Endpoint to retrieve user emails.

Sample configuration:
```yaml
# New configuration settings================================================
GITHUB_AUTHORIZATION_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/login/oauth/authorize
GITHUB_TOKEN_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/login/oauth/access_token
GITHUB_USER_PROFILE_URL=https:/{{ENTERPRISE_INSTANCE_HOST_NAME}}/api/v3/user
GITHUB_USER_EMAIL_URL=https://{{ENTERPRISE_INSTANCE_HOST_NAME}}/api/v3/user/emails

# Configuration settings that remain unchanged in meaning=============================
GITHUB_CLIENT_ID=*****************************************
GITHUB_CLIENT_SECRET=*****************************************
GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback
GITHUB_SCOPE="user:email"
```

The links to configure OAuth for various providers are given below:

1. [**GitHub**](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) (scope: email)
Expand Down