@tomei/sso 0.35.3 → 0.35.4

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.3",
3
+ "version": "0.35.4",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1779,7 +1779,8 @@ export class User extends UserBase {
1779
1779
  public async verify2FASetup(
1780
1780
  userId: number,
1781
1781
  mfaToken: string,
1782
- dbTransaction: any,
1782
+ systemCode?: string,
1783
+ dbTransaction?: any,
1783
1784
  ) {
1784
1785
  // 1. Retrieve user data by calling LoginUser._Repository.findOne with UserId
1785
1786
  const user = await User._Repository.findOne({
@@ -1835,7 +1836,10 @@ export class User extends UserBase {
1835
1836
  const userSession = await this._SessionService.retrieveUserSession(
1836
1837
  `${userId}`,
1837
1838
  );
1838
- const systemCode = ApplicationConfig.getComponentConfigValue('system-code');
1839
+
1840
+ if (!systemCode) {
1841
+ systemCode = ApplicationConfig.getComponentConfigValue('system-code');
1842
+ }
1839
1843
 
1840
1844
  const systemLogin = userSession.systemLogins.find(
1841
1845
  (e) => e.code === systemCode,