Here are the steps to setup this project
NEXTAUTH_SECRET
: go to generate-secret.vercel.app/32 to generate a new next-auth secretNEXTAUTH_URL
: http://localhost:3000 only needed for developmentDATABASE_URL
: a mysql database connection string, you should use planetscale.com to provision oneGOOGLE_CLIENT_ID
,GOOGLE_CLIENT_SECRET
: see Google OAuth credentials section belowFACEBOOK_APP_ID
,FACEBOOK_APP_SECRET
: see Facebook OAuth credentials section belowNEXT_PUBLIC_UPLOAD_URL
: a self host version of this project discloudNEXT_PUBLIC_IMAGE_UPLOAD_URL
: See discord webhook url section below
- Go to console.cloud.google.com/
- Create a new project
- Go to "API & Services" -> OAuth Content Screen
- Enter the app name, email, and the authorized domains | Save and continue
- Add "auth/userinfo.email" and "auth/userinfo.profile" to the scope | Save and continue
- Continue to dashboard
- Press "PUBLISH APP"
- Go to Credentials
- Create credentials -> OAuth client ID
- Application type: "Web application"
- Add "http://localhost:3000" to authorized javascript origins
- Add "http://localhost:3000/api/auth/callback/google" to Authorized redirect URIs
- Application type: "Web application"
- Create credentials -> OAuth client ID
- Copy the client id and secret and use as the env. See .env.example
- Go to developers.facebook.com/apps/create/ to create an app of type "Consumer"
- Enter the app name and create the app
- Go to Settings -> Basic, copy the App ID and App Secret to the env. See .env.example
- Go to freeprivacypolicy.com/free-privacy-policy-generator to create a new privacy policy and copy the URL into the Privacy Policy URL field in the Facebook settings
- Go to freeprivacypolicy.com/free-terms-and-conditions-generator to create new terms of service and copy the URL into the Terms of Service URL field in the Facebook settings
- Go to gdprprivacynotice.com to create a User data deletion policy and copy the URL into the data deletion instructions URL field in the Facebook settings
- Click add product in the sidebar
- Click on "Setup" on Facebook login
- Click on "Facebook Login" -> "Settings" in the left sidebar
- Add "https://localhost:3000/api/auth/callback/facebook" to "Valid OAuth Redirect URIs"
- Save changes
- Change App Mode in the header to "Live".
- Go to discord and create a new Server. The only member must be you only so that no one can access your files.
- Create a new text channel
- Click on the cog icon ⚙️ to "Edit channel"
- Go to "Integration" tab
- Click on "View webhooks"
- "Create a new webhook" and then "Copy Webhook URL". Use that URL as DISCORD_WEBHOOK_URL environment variable