Skip to content

Commit

Permalink
Social Logins (#45)
Browse files Browse the repository at this point in the history
* squashing commits

implementing routes for auth

create passport callback function

adding new user from Google

creating new user

check if user is exist in db

implementing cookie session

Fix error of TypeError: req.session.regenerate is not a function using Passport

fix secret keys

remove Google client secret keys

working on facebook strategy

get email from fb login and update the scope

after verification save the user into db

add profile image in db

fixing minor bugs

fix minor bugs in codes

after rebasing & updating some fts

link social login with userModel

Addong Google client keys & FB client key into yml

send confrim email after register a new user

send email after register from facebook

fix minor bugs

* fix minor errors

* remove lints errors

user register

register user test

register user testing fix

register user testing fix

register user testing fix

Authentication for User

Added slint changes

removed  mocha

 added new features

 added new features

Solved comflicts

changed file

added changes

added new Test

added new Test

resolved test cases

resolved test cases

implemented two-factor authentication for enhanced security

implemented two-factor authentication for enhanced security

check whether the usertype is vendor to proceed with 2FA

test the 2fa authentication

add new tests for buyers login

* feat(rbac): Implement role based access control

-define roles and permissions for vendors and buyers
-assign roles and permissions to users during registration or profile update
-enforce role-based access control throughout the application
-write comprehensive unit tests

[Delivers #34]

* feat(rbac): integrate rbac into user registration

-integrate role based access control into user registration

[Delivers #34]

* feat(rbac): integrate rbac into user registration

-integrate role based access control into user registration

[Delivers #34]

---------

Co-authored-by: ambroisegithub <muhayimana21@gmail.com>

Social Logins (#45)

* squashing commits

implementing routes for auth

create passport callback function

adding new user from Google

creating new user

check if user is exist in db

implementing cookie session

Fix error of TypeError: req.session.regenerate is not a function using Passport

fix secret keys

remove Google client secret keys

working on facebook strategy

get email from fb login and update the scope

after verification save the user into db

add profile image in db

fixing minor bugs

fix minor bugs in codes

after rebasing & updating some fts

link social login with userModel

Addong Google client keys & FB client key into yml

send confrim email after register a new user

send email after register from facebook

fix minor bugs

* fix minor errors

* remove lints errors

user register

register user test

register user testing fix

register user testing fix

register user testing fix

Authentication for User

Added slint changes

removed  mocha

 added new features

 added new features

Solved comflicts

changed file

added changes

added new Test

added new Test

resolved test cases

resolved test cases

implemented two-factor authentication for enhanced security

implemented two-factor authentication for enhanced security

check whether the usertype is vendor to proceed with 2FA

test the 2fa authentication

Design the database schema for storing seller products and related information

create endpoints for category and also database schema

fix routes for products & categories

implement CRUD operations for category entity

create swagger docs for category routes

adds delete  documentation for category routes

complete documentation for category routes

implementing craate new product route and its controller

implementing get product route and its controller

working on update function

Extend API endpoints

store reference ID of vendor

ft-Product-Docs

This PR add the product swagger docs and some test category

bug-documentation-fixes

Fixing the errors on the doumentation

add new tests for buyers login

Design the database schema for storing seller products and related information

create endpoints for category and also database schema

fix routes for products & categories

implement CRUD operations for category entity

create swagger docs for category routes

adds delete  documentation for category routes

complete documentation for category routes

implementing craate new product route and its controller

implementing get product route and its controller

working on update function

Extend API endpoints

store reference ID of vendor

ft-Product-Docs

This PR add the product swagger docs and some test category

bug-documentation-fixes

Fixing the errors on the doumentation

store reference ID of vendor

replacing try & catch with errorHandler middleware

remove all try & catch blocks in product controller

validating routes

fix minor errors in test categories

Category-testing

add category testing cases

init commit for prouct test

product controller test

complete product test

merging all commits

delete product data after testing

add --detectOpenHandles flag

Social Logins (#45)

* squashing commits

implementing routes for auth

create passport callback function

adding new user from Google

creating new user

check if user is exist in db

implementing cookie session

Fix error of TypeError: req.session.regenerate is not a function using Passport

fix secret keys

remove Google client secret keys

working on facebook strategy

get email from fb login and update the scope

after verification save the user into db

add profile image in db

fixing minor bugs

fix minor bugs in codes

after rebasing & updating some fts

link social login with userModel

Addong Google client keys & FB client key into yml

send confrim email after register a new user

send email after register from facebook

fix minor bugs

* fix minor errors

* remove lints errors

user register

register user test

register user testing fix

register user testing fix

register user testing fix

Authentication for User

Added slint changes

removed  mocha

 added new features

 added new features

Solved comflicts

changed file

added changes

added new Test

added new Test

resolved test cases

resolved test cases

implemented two-factor authentication for enhanced security

implemented two-factor authentication for enhanced security

check whether the usertype is vendor to proceed with 2FA

test the 2fa authentication

pull from develop

update profile test

update swagger documentation

Resolve conflict on update profile

fix issue mentioned in comment

fix test issue

fix test issues

fix CI

Revert "update user profile"

ft(backend):establish route,test and swagger doc
-establish get all availble products
-with pagination
-write test of route
-write swagger doc

Feat: Buyer should be able to list products from vendors #57

fix(backend): fix linting error.
-remove all unused

Feat: Buyer should be able to list products from vendors #57

fix(backend): fix vendor returned info
- return specific information on vendor
-shorten the files name

Feat: Buyer should be able to list products from vendors #57

fix(backend):remove files
-put list all products route inside ather product route
-put list all product controller with ather product controller
Feat: Buyer should be able to list products from vendors #57

ft(backend):establish route,test and swagger doc
-establish get all availble products
-with pagination
-write test of route
-write swagger doc

Feat: Buyer should be able to list products from vendors #57

fix(backend): fix linting error.
-remove all unused

Feat: Buyer should be able to list products from vendors #57

fix(backend): fix vendor returned info
- return specific information on vendor
-shorten the files name

Feat: Buyer should be able to list products from vendors #57

fix(backend):remove files
-put list all products route inside ather product route
-put list all product controller with ather product controller
Feat: Buyer should be able to list products from vendors #57
  • Loading branch information
wayneleon1 authored and niyibi250 committed May 20, 2024
1 parent 011cf00 commit 5035519
Show file tree
Hide file tree
Showing 41 changed files with 4,314 additions and 226 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"no-console": "warn",
"quotes": ["error", "single"]
},
"ignorePatterns": ["dist/**/*"]
"ignorePatterns": ["dist/**/*", "src/middlewares/passport-setup.ts"]
}
43 changes: 25 additions & 18 deletions .github/workflows/workflow_for_ecomm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI for ecomm-project for Dynamite

on:
push:
branches: [ "develop" ]
branches: ['develop']
pull_request:
branches: [ "develop" ]
branches: ['develop']

jobs:
build:
Expand All @@ -15,21 +15,21 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test --if-present
- run: npm run build --if-present
- run: npm run test:ci --if-present
- run: npm run lint --if-present
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
allow-empty: true
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test --if-present
- run: npm run build --if-present
- run: npm run test:ci --if-present
- run: npm run lint --if-present
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
allow-empty: true
env:
DB_PORT_DEV: ${{ secrets.DB_PORT_DEV }}
DB_USER_DEV: ${{ secrets.DB_USER_DEV }}
Expand All @@ -47,4 +47,11 @@ jobs:
DB_NAME_TEST: ${{ secrets.DB_NAME_TEST }}
DB_HOST_TEST: ${{ secrets.DB_HOST_TEST }}
MAILGUN_TOKEN: ${{ secrets.MAILGUN_TOKEN }}
MAILGUN_DOMAIN: ${{ secrets.MAILGUN_DOMAIN }}
MAILGUN_DOMAIN: ${{ secrets.MAILGUN_DOMAIN }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_CALLBACK_URL: ${{ secrets.GOOGLE_CALLBACK_URL }}
FACEBOOK_APP_ID: ${{ secrets.FACEBOOK_APP_ID }}
FACEBOOK_APP_SECRET: ${{ secrets.FACEBOOK_APP_SECRET }}
FACEBOOK_CALLBACK_URL: ${{ secrets.FACEBOOK_CALLBACK_URL }}
COOKIES_KEY: ${{ secrets.COOKIES_KEY }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dynamites API ![check-code-coverage](https://img.shields.io/badge/code--coverage-87.77%25-green)
# Dynamites API ![check-code-coverage](https://img.shields.io/badge/code--coverage-74.53%25-yellow)

## Overview

Expand Down
Loading

0 comments on commit 5035519

Please sign in to comment.