@tomei/sso 0.35.4 → 0.35.5

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.35.4",
3
+ "version": "0.35.5",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1851,7 +1851,8 @@ export class User extends UserBase {
1851
1851
  public async verify2FACode(
1852
1852
  userId: number,
1853
1853
  mfaToken: string,
1854
- dbTransaction: any,
1854
+ systemCode?: string,
1855
+ dbTransaction?: any,
1855
1856
  ) {
1856
1857
  // 1. Retrieve user data by calling LoginUser._Repository.findOne with UserId
1857
1858
  const user = await User._Repository.findOne({
@@ -1896,7 +1897,10 @@ export class User extends UserBase {
1896
1897
  const userSession = await this._SessionService.retrieveUserSession(
1897
1898
  `${userId}`,
1898
1899
  );
1899
- const systemCode = ApplicationConfig.getComponentConfigValue('system-code');
1900
+
1901
+ if (!systemCode) {
1902
+ systemCode = ApplicationConfig.getComponentConfigValue('system-code');
1903
+ }
1900
1904
 
1901
1905
  const systemLogin = userSession.systemLogins.find(
1902
1906
  (e) => e.code === systemCode,