Skip to content

Commit a9d3f80

Browse files
authored
Merge pull request #11 from node-oauth/fix/environment-vars
Fix username variable getting replaced with system username in linux envs.
2 parents d09a1a0 + 15c28da commit a9d3f80

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

authorization-code/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ CLIENT_ID=testclient
6666
CLIENT_SECRET=testsecret
6767
REDIRECT_URI=http://localhost:3000/callback
6868
USER_ID=user1
69-
USERNAME=demo
70-
PASSWORD=demo
69+
OAUTH_USERNAME=demo
70+
OAUTH_PASSWORD=demo
7171
```
7272

7373
3. Create a `.env` file in the authorization-code/client directory:

authorization-code/provider/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ CLIENT_ID=testclient
22
CLIENT_SECRET=testsecret
33
REDIRECT_URI=http://localhost:3000/callback
44
USER_ID=user1
5-
USERNAME=demo
6-
PASSWORD=demo
5+
OAUTH_USERNAME=demo
6+
OAUTH_PASSWORD=demo

authorization-code/provider/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ db.saveClient({
2424

2525
db.saveUser({
2626
id: process.env.USER_ID,
27-
username: process.env.USERNAME,
28-
password: process.env.PASSWORD,
27+
username: process.env.OAUTH_USERNAME,
28+
password: process.env.OAUTH_PASSWORD,
2929
});
3030

3131
app.use(bodyParser.json());

0 commit comments

Comments
 (0)