Skip to content

Commit 0f58f85

Browse files
zimegmisscoded
andauthoredMay 1, 2023
Set the Client ID using environment variables (#23)
Co-authored-by: Alissa Renz <alissa.renz@gmail.com>
1 parent 4e72190 commit 0f58f85

File tree

5 files changed

+244
-5
lines changed

5 files changed

+244
-5
lines changed
 

‎.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Environment variables needed to run your app. Rename this file to .env to start!
2+
3+
# The client ID for your GitHub OAuth App
4+
GITHUB_CLIENT_ID=e845f73fa2...

‎README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,23 @@ application**!
7777

7878
#### Add your GitHub Client ID
7979

80+
Start by renaming the `.env.example` file at the top level of your project to
81+
`.env`, being sure not to commit this file to version control. This file will
82+
store sensitive, app-specific variables that are determined by the environment
83+
being used.
84+
8085
From your new GitHub app's dashboard, copy the **Client ID** and paste it as the
81-
value for `client_id` in `external_auth/github_provider.ts` – the custom OAuth2
82-
provider definition for this GitHub app.
86+
value for `GITHUB_CLIENT_ID` in the `.env` file. This value will be used in
87+
`external_auth/github_provider.ts` – the custom OAuth2 provider definition for
88+
this GitHub app.
8389

8490
Once complete, use `slack run` or `slack deploy` to update your local or hosted
85-
app.
91+
app!
92+
93+
> Note: Unlike environment variables used at runtime, this variable is only used
94+
> when generating your app manifest. Therefore, you do **not** need to use the
95+
> `slack env add` command to set this value for
96+
> [deployed apps](#deploying-your-app).
8697
8798
#### Generate a Client Secret
8899

0 commit comments

Comments
 (0)
Please sign in to comment.