From d9dec84818555ad001ac84122ec6955331e0855b Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Tue, 27 Dec 2022 00:14:50 +0100 Subject: [PATCH] using debug credentials provider whenever development mode is active --- website/README.md | 4 ++-- website/src/pages/api/auth/[...nextauth].ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/README.md b/website/README.md index 2b84679c..8b03043a 100644 --- a/website/README.md +++ b/website/README.md @@ -65,9 +65,9 @@ If you're doing active development we suggest the following workflow: ### Using debug user credentials -If you want to quickly test the website, you can use the debug user credentials workflow: +Whenever the website runs in development mode, you can use the debug credentials provider to log in without fancy emails or OAuth. -1. Run `DEBUG_FAKE_USERS=true npm run dev` to start the website. +1. Development mode is automatically active when you start the website with `npm run dev`. 1. Use the `Login` button in the top right to go to the login page. 1. You should see a section for debug credentials. Enter any username you wish, you will be logged in as that user. diff --git a/website/src/pages/api/auth/[...nextauth].ts b/website/src/pages/api/auth/[...nextauth].ts index 0ed0f1a1..fbd0b3d9 100644 --- a/website/src/pages/api/auth/[...nextauth].ts +++ b/website/src/pages/api/auth/[...nextauth].ts @@ -34,7 +34,7 @@ if (process.env.DISCORD_CLIENT_ID) { ); } -if (boolean(process.env.DEBUG_FAKE_USERS)) { +if (boolean(process.env.NODE_ENV === "development")) { providers.push( CredentialsProvider({ name: "Debug Credentials",