diff --git a/site/README.md b/site/README.md index 1ba94e8b56..c438bda5ca 100644 --- a/site/README.md +++ b/site/README.md @@ -17,13 +17,17 @@ By default, the REPL will fetch the most recent version of Svelte from https://u ## REPL GitHub integration -In order for the REPL's GitHub integration to work properly when running locally, you will need to create a GitHub OAuth app. Set its authorization callback URL to `http://localhost:3000/auth/callback`, and in this project, create `site/.env` containing: - -``` -GITHUB_CLIENT_ID=[your app's client id] -GITHUB_CLIENT_SECRET=[your app's client secret] -BASEURL=http://localhost:3000 -``` +In order for the REPL's GitHub integration to work properly when running locally, you will need to: +- [create a GitHub OAuth app](https://github.com/settings/developers): + - set `Authorization callback URL` to `http://localhost:3000/auth/callback`; + - set `Application name` as you like, and `Homepage URL` as `http://localhost:3000/`; + - create the app and take note of `Client ID` and `Client Secret` +- in this repo, create `site/.env` containing: + ``` + GITHUB_CLIENT_ID=[your app's Client ID] + GITHUB_CLIENT_SECRET=[your app's Client Secret] + BASEURL=http://localhost:3000 + ``` ## Translating the API docs diff --git a/site/src/server.js b/site/src/server.js index 3413e218d8..fabda7c0ce 100644 --- a/site/src/server.js +++ b/site/src/server.js @@ -82,11 +82,12 @@ if (process.env.GITHUB_CLIENT_ID) { res.end(`

Missing .env file

-

In order to use GitHub authentication, you will need to register an OAuth application with gist and read:user scopes, and create a .env file:

+

In order to use GitHub authentication, you will need to register an OAuth application and create a local .env file:

GITHUB_CLIENT_ID=[YOUR_APP_ID]\nGITHUB_CLIENT_SECRET=[YOUR_APP_SECRET]\nBASEURL=http://localhost:3000

The BASEURL variable should match the callback URL specified for your app.

+

See also here

`); });