Skip to content

Commit

Permalink
login in to the app via Google
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadowacu1 committed May 31, 2024
1 parent 29f0bab commit 8e7d326
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 473 deletions.
11 changes: 7 additions & 4 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@types/mocha": "^10.0.6",
"@types/multer": "^1.4.11",
"@types/passport-google-oauth2": "^0.1.8",
"@types/sinon": "^17.0.3",
"bcrypt": "^5.1.1",
"chai": "^4.4.1",
"chai-http": "^4.4.0",
Expand Down Expand Up @@ -87,7 +86,6 @@
"sequelize-cli": "^6.6.2",
"sequelize-typescript": "^2.1.6",
"sinon": "^18.0.0",
"sinon-chai": "^3.7.0",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.0",
"ts-node": "^10.9.2",
Expand All @@ -105,13 +103,15 @@
"@types/nodemailer": "^6.4.15",
"@types/pg": "^8.11.6",
"@types/sequelize": "^4.28.20",
"@types/sinon": "^17.0.3",
"@types/swagger-jsdoc": "^6.0.4",
"@types/swagger-ui-express": "^4.1.6",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"lint-staged": "^15.2.2",
"nyc": "^15.1.0"
"nyc": "^15.1.0",
"sinon-chai": "^3.7.0"
}
}
5 changes: 5 additions & 0 deletions src/databases/migrations/20240520180022-create-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export default {
allowNull: false,
defaultValue: false
},
isGoogleAccount:{
type: new DataTypes.BOOLEAN,
allowNull: true,
defaultValue: false
},
is2FAEnabled: {
type: new DataTypes.BOOLEAN,
allowNull: false,
Expand Down
7 changes: 7 additions & 0 deletions src/databases/models/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface UsersAttributes {
currency?: string;
role?: string;
isVerified?: boolean;
isGoogleAccount?:boolean;
is2FAEnabled?: boolean;
status?: string;
createdAt?: Date;
Expand All @@ -41,6 +42,7 @@ class Users extends Model<UsersAttributes, UsersCreationAttributes> implements U
declare currency?: string;
declare role?: string;
declare isVerified?: boolean;
declare isGoogleAccount?:boolean;
declare is2FAEnabled?: boolean;
declare status?: string;
declare password: string;
Expand Down Expand Up @@ -114,6 +116,11 @@ Users.init(
allowNull: true,
defaultValue: false
},
isGoogleAccount:{
type: new DataTypes.BOOLEAN,
allowNull: true,
defaultValue: false
},
is2FAEnabled: {
type: new DataTypes.BOOLEAN,
allowNull: true,
Expand Down
Loading

0 comments on commit 8e7d326

Please sign in to comment.