@brightnkhoma/auth 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,6 @@ export declare class SignUp extends UserDomain {
10
10
  getToken(): string;
11
11
  otp: string | null;
12
12
  getOtp(): string;
13
- verifyEmail(): void;
14
13
  checkIfUserExists(): Promise<void>;
15
14
  generateOTP(): void;
16
15
  getSecret(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"signUp.d.ts","sourceRoot":"","sources":["../../../src/authentication/aggregates/signUp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAatD,qBAAa,MAAO,SAAQ,UAAU;IACtB,OAAO,CAAC,KAAK;IAAzB,YAAoB,KAAK,EAAG,WAAW,EAEtC;IACD,OAAO,CAAC,KAAK,CAAwB;IACrC,QAAQ,CAAC,KAAK,EAAG,MAAM,QAEtB;IACD,QAAQ,WAGP;IAED,GAAG,EAAG,MAAM,GAAG,IAAI,CAAQ;IAE3B,MAAM,WAGL;IAED,WAAW,SAGV;IAEK,iBAAiB,kBAItB;IAED,WAAW,SAEV;IAEC,SAAS,WAMV;IAED,OAAO,CAAC,GAAG,EAAG,MAAM,WASnB;IAEK,OAAO,qBAIZ;IAGD,SAAS,YASR;IAEK,UAAU,oBAOf;IAEK,gBAAgB,CAAC,GAAG,EAAG,MAAM,oBAalC;IAEK,UAAU,mBAQf;IAEK,MAAM,mBAKX;IAGK,SAAS,qBAMd;IAEK,OAAO,mBAMZ;IAGD,MAAM,CAAC,QAAQ,UACY,OAAO,OAAQ,QAAQ,mBAiBjD;IACD,MAAM,CAAC,SAAS,UACW,OAAO,OAAQ,QAAQ,mBAgBjD;CAWJ"}
1
+ {"version":3,"file":"signUp.d.ts","sourceRoot":"","sources":["../../../src/authentication/aggregates/signUp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAatD,qBAAa,MAAO,SAAQ,UAAU;IACtB,OAAO,CAAC,KAAK;IAAzB,YAAoB,KAAK,EAAG,WAAW,EAEtC;IACD,OAAO,CAAC,KAAK,CAAwB;IACrC,QAAQ,CAAC,KAAK,EAAG,MAAM,QAEtB;IACD,QAAQ,WAGP;IAED,GAAG,EAAG,MAAM,GAAG,IAAI,CAAQ;IAE3B,MAAM,WAGL;IAOK,iBAAiB,kBAItB;IAED,WAAW,SAEV;IAEC,SAAS,WAMV;IAED,OAAO,CAAC,GAAG,EAAG,MAAM,WASnB;IAEK,OAAO,qBAIZ;IAGD,SAAS,YASR;IAEK,UAAU,oBAOf;IAEK,gBAAgB,CAAC,GAAG,EAAG,MAAM,oBAalC;IAEK,UAAU,mBAQf;IAEK,MAAM,mBAKX;IAGK,SAAS,qBAMd;IAEK,OAAO,mBAMZ;IAGD,MAAM,CAAC,QAAQ,UACY,OAAO,OAAQ,QAAQ,mBAiBjD;IACD,MAAM,CAAC,SAAS,UACW,OAAO,OAAQ,QAAQ,mBAgBjD;CAWJ"}
package/dist/index.js CHANGED
@@ -4107,10 +4107,10 @@ var SignUp = class _SignUp extends UserDomain {
4107
4107
  if (!this.otp) throw new Error("OTP missing");
4108
4108
  return this.otp;
4109
4109
  }
4110
- verifyEmail() {
4111
- const { email } = this.props;
4112
- if (!email.toLowerCase().trim().endsWith("@theanchoragegroup.com")) throw new Error("Email has to be compnay email ending with @theanchoragegroup.com");
4113
- }
4110
+ // verifyEmail(){
4111
+ // const {email} = this.props;
4112
+ // if(!email.toLowerCase().trim().endsWith("@theanchoragegroup.com")) throw new Error("Email has to be compnay email ending with @theanchoragegroup.com")
4113
+ // }
4114
4114
  async checkIfUserExists() {
4115
4115
  const email = this.props.name.toLocaleLowerCase().trim();
4116
4116
  const users = await this.userDomain.getByFied("email", email);
@@ -4174,7 +4174,6 @@ NOTE: This OTP expires after 20 minutes`, this.props.email);
4174
4174
  return await this.userDomain.add(user);
4175
4175
  }
4176
4176
  async initialize() {
4177
- this.verifyEmail();
4178
4177
  await this.checkIfUserExists();
4179
4178
  this.generateOTP();
4180
4179
  this.generateOTP();
package/dist/index.mjs CHANGED
@@ -4096,10 +4096,10 @@ var SignUp = class _SignUp extends UserDomain {
4096
4096
  if (!this.otp) throw new Error("OTP missing");
4097
4097
  return this.otp;
4098
4098
  }
4099
- verifyEmail() {
4100
- const { email } = this.props;
4101
- if (!email.toLowerCase().trim().endsWith("@theanchoragegroup.com")) throw new Error("Email has to be compnay email ending with @theanchoragegroup.com");
4102
- }
4099
+ // verifyEmail(){
4100
+ // const {email} = this.props;
4101
+ // if(!email.toLowerCase().trim().endsWith("@theanchoragegroup.com")) throw new Error("Email has to be compnay email ending with @theanchoragegroup.com")
4102
+ // }
4103
4103
  async checkIfUserExists() {
4104
4104
  const email = this.props.name.toLocaleLowerCase().trim();
4105
4105
  const users = await this.userDomain.getByFied("email", email);
@@ -4163,7 +4163,6 @@ NOTE: This OTP expires after 20 minutes`, this.props.email);
4163
4163
  return await this.userDomain.add(user);
4164
4164
  }
4165
4165
  async initialize() {
4166
- this.verifyEmail();
4167
4166
  await this.checkIfUserExists();
4168
4167
  this.generateOTP();
4169
4168
  this.generateOTP();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightnkhoma/auth",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A module that automates CRUD functionality and routing and helps you follow DDD(Domain Driven Design) with ease using firebase, express and typescript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "typescript": "^7.0.2"
38
38
  },
39
39
  "peerDependencies": {
40
- "@brightnkhoma/credentials": "1.0.2",
40
+ "@brightnkhoma/credentials": "^1.0.3",
41
41
  "express": "^5.2.1",
42
42
  "nodemailer": "^10.0.12",
43
43
  "@brightnkhoma/domain": "^1.0.5"