Skip to content

Commit 65da49a

Browse files
dan-foleyDevinCLane
authored andcommitted
Edit Discord 0Auth2 Docs
Complete requested changes Edit Discord 0Auth2 Docs Edit Discord 0Auth2 Docs Fixed button screenshot Trying to get image to load correctly Finish Discord 0Auth2 Setup instructions Note to check login Fix redirect button image Fix localhost link
1 parent 6552a3a commit 65da49a

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

docs/02-Onboarding.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,40 @@ _`DISCORD_CLIENT_SECRET` is not required unless you need to test the discord log
6868

6969
You can create your own `DISCORD_CLIENT_ID` and `DISCORD_CLIENT_SECRET` by going to [Discord Developer Portal](https://discord.com/developers/docs/intro).
7070

71-
Under **OAuth2**
71+
Under **[OAuth2](https://discord.com/developers/docs/topics/oauth2)**
72+
73+
- Set up Client Id and Client Secret [here](https://discord.com/developers/applications).
74+
- Click on New Application in the top-right corner.
75+
76+
<p><img src="images/discord-oauth-new-application-button.JPG" alt="screenshot of discord new application button" width="100"></p>
77+
78+
- After naming your app ("Together local", for example) navigate to 0Auth2 in the menu on the left.
79+
- Click "Add Redirect" and set to `http://localhost:2121/api/auth/discord/callback`.
80+
81+
<p><img src="images/discord-redirect-button.jpg" alt="screenshot of add discord add redirect button" width="500"></p>
82+
83+
- Locate Client ID right above. Click "Reset Secret" button and enter your discord password to get secret. Make sure to copy both the `client id` and the `client secret`.
84+
85+
<p><img src="images/discord-client-secret.JPG" alt="screenshot of discord client secret section" width="500"></p>
7286

73-
- Set up Client Id and Client Secret
74-
- Set the Redirects to `http://localhost:2121/api/auth/discord/callback`.
7587
- Update .env to:
7688

77-
```
78-
PORT=2121
79-
DB_STRING=mongodb://127.0.0.1:27017/
80-
DISCORD_CLIENT_ID=YOUR ID
81-
DISCORD_CLIENT_SECRET=YOUR SECRET
82-
OAUTH_REDIRECT_URL=http://localhost:3000/
83-
MOCK_USER=false
84-
NODE_ENV=development
85-
```
89+
```
90+
PORT=2121
91+
DB_STRING=mongodb://127.0.0.1:27017/
92+
DISCORD_CLIENT_ID=YOUR ID
93+
DISCORD_CLIENT_SECRET=YOUR SECRET
94+
OAUTH_REDIRECT_URL=http://localhost:3000/
95+
MOCK_USER=false
96+
NODE_ENV=development
97+
```
8698

87-
**To start the Test Event API, execute this command:**
99+
To start the Test Event API, execute this command:
88100

89101
- `npm run dev`
90102

103+
Then open [localhost:3000](http://localhost:3000) and try to log in through Discord!
104+
91105
<!--
92106
| Doc | Overview |
93107
|--|--|
29.5 KB
Loading
4.15 KB
Loading
14.2 KB
Loading

0 commit comments

Comments
 (0)