@tomei/sso 0.8.12 → 0.8.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.8.12",
3
+ "version": "0.8.14",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@tomei/general": "^0.4.3",
61
- "@tomei/mailer": "^0.5.2",
61
+ "@tomei/mailer": "^0.5.3",
62
62
  "@types/jest": "^29.5.2",
63
63
  "argon2": "^0.30.3",
64
64
  "cls-hooked": "^4.2.2",
@@ -73,5 +73,8 @@
73
73
  "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
74
74
  "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
75
75
  ]
76
+ },
77
+ "dependencies": {
78
+ "@tomei/config": "^0.2.0"
76
79
  }
77
80
  }
@@ -65,8 +65,6 @@ export class LoginUser extends LoginUserBase {
65
65
  ) {
66
66
  super();
67
67
  this._SessionService = sessionService;
68
- // this._PasswordHashService = new PasswordHashService();
69
- // this._MailService = new MailService();
70
68
 
71
69
  if (dbTransaction) {
72
70
  this._dbTransaction = dbTransaction;
@@ -83,9 +81,11 @@ export class LoginUser extends LoginUserBase {
83
81
  }
84
82
  }
85
83
 
86
- static async init(userId?: string, dbTransaction = null): Promise<LoginUser> {
87
- const sessionService = await SessionService.init();
88
-
84
+ static async init(
85
+ sessionService: ISessionService,
86
+ userId?: string,
87
+ dbTransaction = null,
88
+ ): Promise<LoginUser> {
89
89
  if (userId) {
90
90
  if (dbTransaction) {
91
91
  LoginUser._Repository = new UserRepository();