-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
created debug credentials provider #68
created debug credentials provider #68
Conversation
Co-authored-by: Ville Lahdenvuo <tuhoojabotti@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, I didn't notice that provider.
I proposed two small alternatives to smooth out the setup process.
@@ -32,6 +34,23 @@ if (process.env.DISCORD_CLIENT_ID) { | |||
); | |||
} | |||
|
|||
if (boolean(process.env.DEBUG_FAKE_USERS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just do this whenever we're running in development mode? If so we could cut out a new env variable and make this
if (process.env.NODE_ENV === "development") {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great idea. I've pushed a change for this and adjusted documentation
Co-authored-by: Ville Lahdenvuo <tuhoojabotti@gmail.com>
if DEBUG_FAKE_USERS is set, a credentials provider for next auth is created that lets one log in with an arbitrary username and always get accepted. this simplifies the experience for newcomers who just want to e.g. create a UI component.