Skip to content

Commit

Permalink
feat(Reset-password):User who forgot password can reset it via email
Browse files Browse the repository at this point in the history
- User who forgot password can request resetting it
- Sending reset-password email containing link along with token to reset password
- Reset password using the provided token
- Token is used only once

[Delivers #187419058]
  • Loading branch information
YvetteNyibuka committed Apr 29, 2024
1 parent 58a898d commit 145cb1d
Show file tree
Hide file tree
Showing 22 changed files with 666 additions and 193 deletions.
18 changes: 6 additions & 12 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@ GOOGLE_SECRET_ID=
GOOGLE_CALLBACK_URL=
SESSION_SECRET=


JWT_SECRET=


BASE_URL = < your BASE_URL>
HOST = < your Host >
SERVICE = < your SERVICE >


EMAIL=<your email>
PASSWORD=<email password>

ACCESS_TOKEN_SECRET=
SENDER_NAME=
EMAIL=
PASSWORD=
ACCESS_TOKEN_SECRET=
SENDGRID_API_KEY=<YOUR_GRID_API_KEY>
13 changes: 5 additions & 8 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: build

on:
push:
branches:
Expand All @@ -9,7 +8,6 @@ on:
branches:
- develop
- "*"

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -25,16 +23,19 @@ jobs:
DB_HOSTED_MODE: ${{ secrets.DB_HOSTED_MODE }}
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
SENDER_NAME: ${{ secrets.SENDER_NAME }}
GOOGLE_CALLBACK_URL: ${{ secrets.GOOGLE_CALLBACK_URL }}
GOOGLE_SECRET_ID: ${{ secrets.GOOGLE_SECRET_ID }}
DB_PROD_URL: ${{ secrets.DB_PROD_URL }}
DB_DEV_URL: ${{ secrets.DB_DEV_URL }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}

strategy:
matrix:
node-version: ["20.x"]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -44,7 +45,6 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test

Expand All @@ -54,14 +54,11 @@ jobs:
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Store coverage report
if: always()
run: mkdir -p coverage

- name: Send coverage report to Code Climate
if: always()
run: ./cc-test-reporter after-build -t lcov -p coverage

- name: coveralls
run: npx coveralls < coverage/lcov.info
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
"/src/utils/token.validation.ts",
"/src/services/mailService.ts",
"/src/middlewares/passport.ts",
"/src/database/config/db.config.ts"
"/src/database/config/db.config.ts",
"/src/utils",
"src/helpers",
"src/documention/index.ts"
]
},
"devDependencies": {
Expand Down
15 changes: 0 additions & 15 deletions src/__test__/product.test.ts

This file was deleted.

Loading

0 comments on commit 145cb1d

Please sign in to comment.