Skip to content

docs: clarify .env usage in CONTRIBUTING.md [skip release] #1085

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

Merged
merged 1 commit into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Rename file to .env and populate values
# to be able to run tests
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_TWITTER_ID=
NEXTAUTH_TWITTER_SECRET=
Expand Down
6 changes: 6 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Rename file to .env.local and populate values
# to be able to run the dev app
NEXTAUTH_URL=http://localhost:3000
SECRET=
GITHUB_ID=
GITHUB_SECRET=
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ npm i

3. Populate `.env.local`:

Copy `.env.example` to `.env.local`, and add your env variables for each provider you want to test.
Copy `.env.local.example` to `.env.local`, and add your env variables for each provider you want to test.

>NOTE: You can configure providers of the dev app in `pages/api/auth/[...nextauth].js`
> NOTE: You can add any environment variables to .env.local that you would like to use in your dev app.
> You can find the next-auth config under`pages/api/auth/[...nextauth].js`.

4. Start the dev application/server and CSS watching:
1. Start the dev application/server and CSS watching:
```sh
npm run dev
```
Expand Down