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 323448c commit 4ba44f6
Show file tree
Hide file tree
Showing 21 changed files with 1,042 additions and 191 deletions.
16 changes: 5 additions & 11 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>

SENDER_NAME=
EMAIL=
PASSWORD=
ACCESS_TOKEN_SECRET=
SENDGRID_API_KEY=<YOUR_GRID_API_KEY>
21 changes: 8 additions & 13 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 @@ -28,11 +26,18 @@ jobs:
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 }}
PORT: ${{ secrets.PORT }}

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

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

- name: Run tests
run: npm run test

- name: Run tests and build test coverage
run: npm run test:ci

- name: Setup Code Climate test-reporter
run: |
# Download test reporter as a static binary
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: Run tests
run: npm run test

- 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
Loading

0 comments on commit 4ba44f6

Please sign in to comment.