Skip to content
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

167730742 Ft login via email and password #27

Merged
merged 121 commits into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
2e5a078
feature(email-verification):add email verification logic for users to…
zanio Aug 19, 2019
18ce054
feature(email-verification):edit email verification logic for users t…
zanio Aug 19, 2019
5c26f99
feature(email-verification):edit email verification logic for users t…
zanio Aug 19, 2019
39a0fb4
chore(email-erification):finish email verification
zanio Aug 21, 2019
420b0a2
feature(email-verification-route):add a route to test email verificat…
zanio Aug 21, 2019
f0122b7
chore(merge-conflict):fix merge conflict
zanio Aug 21, 2019
bca3153
chore(email-verification):fix email verification routes
zanio Aug 21, 2019
812bda7
chore(email-verification):fix email verification routes
zanio Aug 21, 2019
d8cf0e6
bug(fix-merge-conflict):fix merge problem
zanio Aug 21, 2019
9db9c60
install packages
marusoft Aug 21, 2019
7227a1d
chore(email-verification):delete and restructure the file folder
zanio Aug 21, 2019
a26336e
chore(eslint):enabled eslint and fix common error
zanio Aug 21, 2019
6a45cd0
chore(test):add test to email verification feature
zanio Aug 22, 2019
2ba038c
chore(eslint-fix):fix eslint
zanio Aug 22, 2019
f917e93
chore(test):add test framework
zanio Aug 22, 2019
d0c7983
chore(test):add test framework
zanio Aug 22, 2019
2877554
bug(hound-fix):fix hound warning error
zanio Aug 22, 2019
b3754b8
chore(env):rename env file to just .env
zanio Aug 22, 2019
294c2ab
chore(test):fix dotenv to run locally
zanio Aug 22, 2019
8924a8f
chore(dotenv-tes-cmd):require dotenv on test script
zanio Aug 22, 2019
c423e0d
chorre(secretkey-jwt):debug jwt build error
zanio Aug 22, 2019
d3cdaa9
chore(dotenv-failure):fix dotenv failure
zanio Aug 22, 2019
9faf6d8
chore(dotenv-failure):fix dotenv failure
zanio Aug 22, 2019
8169e23
correct eslint error
marusoft Aug 22, 2019
2a475cd
chore(travis-fix):fix travis build fail
zanio Aug 22, 2019
68cd5b1
chore(travis-fix):fix travis build fail
zanio Aug 22, 2019
49368dd
chore(travis-fix):fix travis build fail
zanio Aug 22, 2019
e7acf1e
chore(dotenv-fix):remove .env from .giignore
zanio Aug 22, 2019
48b4c06
Merge branch 'stage' of https://github.com/andela/firestar-backend in…
zanio Aug 22, 2019
9836133
chore(async-await-test):use async await for test folder
zanio Aug 22, 2019
a4c6463
ft(login): remove line from readME file
marusoft Aug 24, 2019
ea8fa1b
ft(login): add database port
marusoft Aug 24, 2019
6d6323e
ft(login): create user controller and service
marusoft Aug 24, 2019
2ca028c
ft(login): create users endpoint route
marusoft Aug 24, 2019
738b79c
ft(login): add jwt and bycrypt helperUtils file
marusoft Aug 26, 2019
8536666
chore(test-&-email-confirmation):add email confirmation route and wri…
zanio Aug 26, 2019
1b2f051
chore(file-rename):rename the email confirmation
zanio Aug 26, 2019
94f9c99
chore(test):refractor test code
zanio Aug 26, 2019
1f1785a
chore(test-coverage):increase test coverage
zanio Aug 26, 2019
0773981
chore(test-coverage):increase test coverage
zanio Aug 26, 2019
4008ad4
chore(code-review):implement feedback from the code review
zanio Aug 27, 2019
411440b
chore(remove-env-gitignore):remove gitignore
zanio Aug 27, 2019
befaf25
chore(remove-env-gitignore):remove gitignore
zanio Aug 27, 2019
572a382
ft(login): implement test on login feature
marusoft Aug 27, 2019
8462435
chore(reviewed-test):implement review from ogo
zanio Aug 27, 2019
78a0829
chore(reviewed-test):implement review from ogo
zanio Aug 27, 2019
ca31eef
chore(test-coverage):increase test coverage
zanio Aug 27, 2019
403ff3d
chore(.env.example):add back .env.example file
zanio Aug 28, 2019
55dfcd5
chore(.env.example):add back .env.example file
zanio Aug 28, 2019
c513c36
bug(env-example-correct):correct env naming and file
zanio Aug 28, 2019
5d893d1
chore(email-verification):implemented TTL reviews
zanio Aug 28, 2019
99f6785
chore(throw-error-absent-body):catch error when body is not present
zanio Aug 28, 2019
4ae0583
chore(throw-error-absent-body):catch error when body is not present
zanio Aug 28, 2019
3dd6328
chore(email-link):fix link issue
zanio Aug 28, 2019
869a525
chore(enable-secure-proxy):add secure proxy to app configuration
zanio Aug 28, 2019
c826f7f
ft(login-via-email-password) write more test to improve coverage
marusoft Aug 28, 2019
b4c7ab2
chore(js-docs):implement js-doc to all code
zanio Aug 28, 2019
0d243c2
chore(js-docs):implement js-doc to all code
zanio Aug 28, 2019
f7996a4
chore(js-docs):implement js-doc to all code
zanio Aug 28, 2019
7d572ae
chore(email-verification-validation):add validation to email verifica…
zanio Aug 29, 2019
187353b
chore(email-verification-validation):add validation to email verifica…
zanio Aug 29, 2019
40357fd
chore(email-verification-test):add more test
zanio Aug 29, 2019
b06b252
chore(TTL-review):implement TTL review
zanio Aug 29, 2019
7a09b48
chore(TTL-review):implement TTL review
zanio Aug 29, 2019
09f291d
chore(TTL-review):implement TTL review
zanio Aug 29, 2019
4641b01
ft(login): implemented feedback and fix failing tests
marusoft Aug 29, 2019
fb0a760
chore(TTL-review):add TTL review
zanio Aug 29, 2019
13f44d5
ft(login): implement feedback
marusoft Aug 30, 2019
10b3fa4
ft(login): run build file
marusoft Aug 30, 2019
0951782
ft(login): remove dist file from gitignore
marusoft Aug 30, 2019
1b03650
chore(set-port):add port decider on local and production enviroment
zanio Aug 30, 2019
4fe20db
chore(set-port):add port decider on local and production enviroment
zanio Aug 30, 2019
70190e3
chore(req.hostname):add hostname ternary decider for links
zanio Aug 30, 2019
fc851b3
chore(spell-error):correct response grammer
zanio Aug 30, 2019
e3a1fc9
modify sequelize
marusoft Aug 30, 2019
630ca12
refactor entire codebase
marusoft Aug 31, 2019
23363c6
ft(login): gitignore dist
marusoft Aug 31, 2019
7cb9aea
ft(login) add string type to jsdoc
marusoft Aug 31, 2019
c6d4759
ft(login): refactor useController
marusoft Aug 31, 2019
98a5b49
ft(login): refactor code
marusoft Aug 31, 2019
c7f7c08
rename secret key
marusoft Aug 31, 2019
6da44c5
Merge branch 'stage' into ft-login-email-password-167730742
marusoft Aug 31, 2019
caddf92
add dist to gitignore file
marusoft Aug 31, 2019
7138fd2
Merge branch 'ft-login-email-password-167730742' of https://github.co…
marusoft Aug 31, 2019
b2e44ed
ft
marusoft Aug 31, 2019
a16da6e
ft(login): remove conflict files
marusoft Sep 1, 2019
3c65e16
ft(login): modify user services
marusoft Sep 1, 2019
ff0f972
ft(login): create script for db command for dev
marusoft Sep 1, 2019
5efdd31
ft(login): fix constraint user email
marusoft Sep 1, 2019
ded762f
seeded data to db
marusoft Sep 2, 2019
a128403
ft(login): refactor code and rename files and folders
marusoft Sep 2, 2019
0244072
ft(login): resolved merge conflict
marusoft Sep 2, 2019
c4b80ae
ft(login): refactor codebase
marusoft Sep 3, 2019
3719abc
ft(login): uncomment lines of code causing test to fail
marusoft Sep 3, 2019
ed11566
create models and migrations
marusoft Sep 4, 2019
170b0bf
ft(login): create lastlogin for users
marusoft Sep 5, 2019
9652d59
ft(login): create users and login models and migrations
marusoft Sep 6, 2019
5cb3094
ft(login): complete implementation
marusoft Sep 6, 2019
2f8c66e
ft(login): refactor user controller
marusoft Sep 6, 2019
10473c2
ft(login): implement peer review feedback
marusoft Sep 6, 2019
386774f
ft(login): refactor user controller function
marusoft Sep 7, 2019
b27e6e8
ft(login): create login route
marusoft Sep 11, 2019
a34411a
Merge remote-tracking branch 'origin' into ft-login-email-password-16…
marusoft Sep 11, 2019
2713cd7
bug(travis): fix failing tests
marusoft Sep 11, 2019
35a52b6
ft(login): update .env.example file
marusoft Sep 11, 2019
afee24e
ft(login): add descriptions to the value in .env.example file
marusoft Sep 11, 2019
041a085
bug(login): implement feedback from TTL
marusoft Sep 11, 2019
c778a37
bug(login): fix failing test
marusoft Sep 11, 2019
8fba433
bug(login): fix failing tests
marusoft Sep 12, 2019
b242bb0
bug(fix): fix failing tests
marusoft Sep 12, 2019
2322115
bug(login): refactor user controller and unnecessary test
marusoft Sep 12, 2019
eb3e1c3
bug(login): fix failing test
marusoft Sep 12, 2019
abc54dc
Merge branch 'stage' of https://github.com/andela/firestar-backend in…
marusoft Sep 12, 2019
7414125
chore(login): resolves merge conflict
marusoft Sep 12, 2019
8cb8742
chore(login): fix dependencies spelling err
marusoft Sep 13, 2019
be0dc7e
bug(login): resolves coverage drop
marusoft Sep 13, 2019
d536606
bug(login): fix failing test and add validation for login parameters
marusoft Sep 13, 2019
0fe391a
bug(login): fix email and password untrimmed issue
marusoft Sep 13, 2019
61d2981
bug(login): remove code duplication
marusoft Sep 13, 2019
5cab46f
bug(login): add trim function to the request body in the controller
marusoft Sep 14, 2019
bdc7b5e
bug(login): remove duplicate route endpoints
marusoft Sep 15, 2019
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
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
NODE_ENV=test
SALT= random numbers
TOKENEXPIRY=somenumber
DB_USERNAME=database username
DB_PASSWORD=database password
DB_NAME=name of database for development
DB_HOST=Host url
PORT=port number to listen for connections
DB_TEST_NAME=name of test database
EMAIL =
LAYER = Nodemailer package require you provide the LAYER which is the sender mailling service provider. It can be e.g include Yahoo, gmail and your private account mail provider as well.we intend
PASSWORD =
SECRET_KEY_EMAIL_VERIFY_TOKEN =
CLIENT_URL="https://db_name.herokuapp.com"
HOST="localhost"
NODE_ENV="test"
YOUR_EMAIL="" (description: email to create test account and receive reset email link, must be able to access the email)
SOME_PASSWORD="" (description: password to create a test account, must include no less than 4 characters)
SENDGRID_API_KEY="" (description: sendgrid api key with permission to send mail)
DATABASE_URL="postgres://postgres@localhost:5432/db_name"
DATABASE_URL_TEST="postgres://postgres@localhost:5432/db_name_test"
JWT_SECRET="secret-value"
SECRET="random-charaters"
SECRET_KEY_SIGN_UP=some-secret-value
JWT_SECRET=secret variable to sign and decode tokens
SECRET_KEY_SIGN_UP = choose any random character
EMAIL_VERIFY_TOKEN_SECRET_KEY = choose any random character
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=======

# Barefoot Nomad - Making company travel and accomodation easy and convinient.

## Vision
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"migrate:prod": "cross-env NODE_ENV=production sequelize db:migrate",
"undo:dev": "sequelize db:migrate:undo:all",
"undo:test": "cross-env NODE_ENV=test sequelize db:migrate:undo:all",
"undo:prod": "cross-env NODE_ENV=production sequelize db:migrate:undo:all",
"seed:dev": "sequelize db:seed:all",
"seed:test": "cross-env NODE_ENV=test sequelize db:seed:all"
"seed:dev": "cross-env NODE_ENV=development sequelize db:seed:all",
"seed:test": "cross-env NODE_ENV=test sequelize db:seed:all",
"undo:seed": "cross-env NODE_ENV=development npx sequelize-cli db:seed:undo:all"
},
"author": "Andela Simulations Programme",
"license": "MIT",
Expand Down Expand Up @@ -63,8 +63,10 @@
"request": "^2.87.0",
"sequelize": "^5.15.2",
"sequelize-cli": "^5.5.0",
"superagent": "^5.1.0",
"swagger-ui-express": "^4.0.7",
"underscore": "^1.9.1"
"underscore": "^1.9.1",
"validatorjs": "^3.15.1"
},
"devDependencies": {
"chai": "^4.2.0",
Expand Down
38 changes: 0 additions & 38 deletions src/__tests__/dummyLogin.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import './utils/hash';
import './validations/resetPassword';
import './routes/users/emailverification';
import './routes/users/signup';
import './dummyLogin';
import './routes/users/userRole';
import './routes/users/login';
Loading