Skip to content

Commit

Permalink
Merge pull request #21 from AnandBaburajan/user-auth
Browse files Browse the repository at this point in the history
User auth
  • Loading branch information
anandbaburajan authored Jan 27, 2021
2 parents fe8e6cd + 9bbc11c commit 6a51749
Show file tree
Hide file tree
Showing 14 changed files with 13,694 additions and 227 deletions.
24 changes: 18 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
# .env.example

PORT=5000

LOG_LEVEL=info

NODE_ENV=development

CORS_URL=*

DB_NAME=pollsdb

DB_HOST=hostname

DB_USER=username

DB_USER_PWD=password

# Email encryption

PUBLIC_ENCRYPTION_KEY=your key of length 32 characters here
PUBLIC_ENCRYPTION_IV=your key of length 16 characters here

# Firebase

TYPE=
PROJECT_ID=
PRIVATE_KEY_ID=
PRIVATE_KEY=
CLIENT_EMAIL=
CLIENT_ID=
AUTH_URI=
TOKEN_URI=
AUTH_PROVIDER_X509_CERT_URL=
CLIENT_X509_CERT_URL=
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $ npm install

### Setup

Make a copy of the .env.example file to .env
Go to [Firebase](https://firebase.google.com/) and create a project. In the authentication section, enable sign-in with Google. Then generate a private key from Project Overview > Project Settings > Service Accounts > Firebase Admin SDK. Next, make a copy of the .env.example file to .env and set the vars corresponding to the private key you generated.

### Run

Expand All @@ -51,7 +51,7 @@ $ npm run test

### Deployment

In your .env, change the `NODE_ENV` to `production` and set the `DB_HOST`, `DB_USER` and `DB_USER_PWD` variables corresponding to your MongoDB Atlas instance.
In your .env, change the `NODE_ENV` to `production` and set the `DB_HOST`, `DB_USER` and `DB_USER_PWD` variables corresponding to your MongoDB Atlas instance. Make sure the Firebase credentials in .env are correct and that you added your domain to the 'Authorized domains' section in your Firebase project.

## Contributing

Expand Down
Loading

0 comments on commit 6a51749

Please sign in to comment.