@tomei/sso 0.35.3 → 0.35.5
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1779,7 +1779,8 @@ export class User extends UserBase {
|
|
1779
1779
|
public async verify2FASetup(
|
1780
1780
|
userId: number,
|
1781
1781
|
mfaToken: string,
|
1782
|
-
|
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
|
-
|
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,
|
@@ -1847,7 +1851,8 @@ export class User extends UserBase {
|
|
1847
1851
|
public async verify2FACode(
|
1848
1852
|
userId: number,
|
1849
1853
|
mfaToken: string,
|
1850
|
-
|
1854
|
+
systemCode?: string,
|
1855
|
+
dbTransaction?: any,
|
1851
1856
|
) {
|
1852
1857
|
// 1. Retrieve user data by calling LoginUser._Repository.findOne with UserId
|
1853
1858
|
const user = await User._Repository.findOne({
|
@@ -1892,7 +1897,10 @@ export class User extends UserBase {
|
|
1892
1897
|
const userSession = await this._SessionService.retrieveUserSession(
|
1893
1898
|
`${userId}`,
|
1894
1899
|
);
|
1895
|
-
|
1900
|
+
|
1901
|
+
if (!systemCode) {
|
1902
|
+
systemCode = ApplicationConfig.getComponentConfigValue('system-code');
|
1903
|
+
}
|
1896
1904
|
|
1897
1905
|
const systemLogin = userSession.systemLogins.find(
|
1898
1906
|
(e) => e.code === systemCode,
|