-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change mail options to OAuth and update database url
- Loading branch information
Showing
4 changed files
with
80 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
PORT = | ||
IP = | ||
DATABASEURL = | ||
GMAILID = | ||
GMAILPW = | ||
PORT=3000 | ||
|
||
DB_HOST= | ||
DB_NAME= | ||
DB_USERNAME= | ||
DB_PASSWORD= | ||
DB_PORT= | ||
|
||
OAUTH_CLIENT_ID= | ||
OAUTH_CLIENT_SECRET= | ||
OAUTH_CLIENT_REFRESH_TOKEN= | ||
OAUTH_CLIENT_EMAIL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,40 @@ | ||
# sparkTest | ||
# Authentication Portal Sample | ||
|
||
## Setup | ||
|
||
- Clone this repository | ||
|
||
- Install [MongoDb](https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04) | ||
- Create Role | ||
```sh | ||
db.createRole({ createRole: <Role Name>, privileges: [ { | ||
resource: { db: <Database Name>, collection: "" }, | ||
actions: [ "find","insert","update","createIndex","createCollection","remove" ]} | ||
], roles: [{ role: "read", db: <Database Name>}] }) | ||
``` | ||
- Create User | ||
```sh | ||
- db.createUser({"user" : <User name>,pwd: <Password>, "roles" : [{"role" : <Role Name Created>, "db" : <Database Name>}]}) | ||
``` | ||
- Install npm packages | ||
```sh | ||
- npm install | ||
``` | ||
- Make a .env file with the same fields as .env.sample | ||
```sh | ||
- cp .env.sample .env | ||
``` | ||
- Fill the .env file accordingly | ||
### For OAuth Credentials | ||
- Use your oauth secrets by registering [here](https://console.developers.google.com/) | ||
## Using the app | ||
- Run the app | ||
```sh | ||
- npm start | ||
``` | ||
- Visit the url as mentioned in the terminal, usually http://localhost:3000 | ||
A working model for this website is available at https://spark-sampl.herokuapp.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters