Addressing comments

Signed-off-by: Nicolas Arnold <nic@roadie.io>
This commit is contained in:
Nicolas Arnold
2021-09-27 17:26:40 +01:00
parent e6cb54be9b
commit 4098ade69d
2 changed files with 7 additions and 2 deletions
+6
View File
@@ -41,6 +41,8 @@ auth:
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
## uncomment if using GitHub Enterprise
# enterpriseInstanceUrl: ${AUTH_GITHUB_ENTERPRISE_INSTANCE_URL}
## uncomment if intermediate service is used when using github apps
# callbackUrl: ${AUTH_GITHUB_CALLBACK_URL}
```
The GitHub provider is a structure with three configuration keys:
@@ -50,6 +52,10 @@ The GitHub provider is a structure with three configuration keys:
- `clientSecret`: The client secret tied to the generated client ID.
- `enterpriseInstanceUrl` (optional): The base URL for a GitHub Enterprise
instance, e.g. `https://ghe.<company>.com`. Only needed for GitHub Enterprise.
- `callbackUrl` (optional): The callback url that GitHub will use when
initiating an OAuth flow, e.g.
`https://your-intermediate-service.com/handler`. Only needed if Backstage is
not the immediate receiver (e.g. one OAuth app for many backstage instances).
## Adding the provider to the Backstage frontend
@@ -223,8 +223,7 @@ export const createGithubProvider = (
const enterpriseInstanceUrl = envConfig.getOptionalString(
'enterpriseInstanceUrl',
);
const customCallbackUrl =
envConfig.getOptionalString('customCallbackUrl');
const customCallbackUrl = envConfig.getOptionalString('callbackUrl');
const authorizationUrl = enterpriseInstanceUrl
? `${enterpriseInstanceUrl}/login/oauth/authorize`
: undefined;