- Create
.env.local
file from.env
file* - Go to: https://discordapp.com/developers/applications
- Create new application or select existing one.
- From General Information tab copy Client Id and Client Secret and place them under
APP_SECURITY_OAUTH_DISCORD_CLIENT_ID
andAPP_SECURITY_OAUTH_DISCORD_CLIENT_SECRET
keys respectively in.env.local
file. - Go to application OAuth tab and add a new redirect to
https://<your domain>/security/connect/discord/check
. - Go to Bot tab and create a new bot or use existing one. Bot doesn't need to have any privileges. Add bot to your server. Copy bot Token and place it under
APP_SECURITY_OAUTH_DISCORD_BOT_TOKEN
key in.env.local
file. - Get your Discord Server Id from Server Settings → Widget tab and place it under
APP_SECURITY_OAUTH_DISCORD_SERVER_ID
key in.env.local
file. - Enter roles names that user must have assigned to be considered a recruit or a member of the unit and place them under
APP_SECURITY_OAUTH_DISCORD_RECRUIT_ROLE_NAME
andAPP_SECURITY_OAUTH_DISCORD_MEMBER_ROLE_NAME
keys respectively in.env.local
file.
* You can also use system environment variables for this.