@singularsystems/neo-core 1.4.1 → 1.4.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Neo core changelog
|
|
2
2
|
|
|
3
|
+
## Version 1.4.2 (11 May 2026)
|
|
4
|
+
|
|
5
|
+
- Authentication service
|
|
6
|
+
- Changed `loadUserFromSession` to try perform a silent sign in when the app is opened from another window.
|
|
7
|
+
- Change your startup code accordingly:
|
|
8
|
+
```diff
|
|
9
|
+
-if (config.isDevelopment) {
|
|
10
|
+
- await authService.loadUserFromSession();
|
|
11
|
+
-}
|
|
12
|
+
+await authService.loadUserFromSession();
|
|
13
|
+
```
|
|
14
|
+
|
|
3
15
|
## Version 1.4.1 (20 April 2026)
|
|
4
16
|
|
|
5
17
|
- Navigation helper
|
|
@@ -3,6 +3,7 @@ import { ISignInResult } from './SignInResult';
|
|
|
3
3
|
export default interface IAuthenticationService {
|
|
4
4
|
/**
|
|
5
5
|
* Load a user from session storage if there is a stored token.
|
|
6
|
+
* Will also try perform a silent sign in if opened from another window.
|
|
6
7
|
*/
|
|
7
8
|
loadUserFromSession(): Promise<IUser | null>;
|
|
8
9
|
/**
|
|
@@ -20,7 +20,6 @@ export default abstract class OidcAuthService<TUser extends OidcUser = OidcUser>
|
|
|
20
20
|
*/
|
|
21
21
|
constructor(userManager: IUserManager, axios: AxiosInstance);
|
|
22
22
|
isSigningOut: boolean;
|
|
23
|
-
loadUserFromToken(): Promise<TUser | null>;
|
|
24
23
|
loadUserFromSession(): Promise<TUser | null>;
|
|
25
24
|
ensureSignedIn(redirectLocal?: string): boolean;
|
|
26
25
|
/**
|
|
@@ -28,9 +28,6 @@ var OidcAuthService = /** @class */ (function () {
|
|
|
28
28
|
this.userManager.events.addAccessTokenExpiring(this.signinSilent.bind(this));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
OidcAuthService.prototype.loadUserFromToken = function () {
|
|
32
|
-
return this.loadUserFromSession();
|
|
33
|
-
};
|
|
34
31
|
OidcAuthService.prototype.loadUserFromSession = function () {
|
|
35
32
|
return __awaiter(this, void 0, void 0, function () {
|
|
36
33
|
var user;
|
|
@@ -45,8 +42,14 @@ var OidcAuthService = /** @class */ (function () {
|
|
|
45
42
|
return [4 /*yield*/, this.completeAfterUserLoaded()];
|
|
46
43
|
case 2:
|
|
47
44
|
_a.sent();
|
|
48
|
-
|
|
49
|
-
case 3:
|
|
45
|
+
return [2 /*return*/, this.user];
|
|
46
|
+
case 3:
|
|
47
|
+
if (!!!window.opener) return [3 /*break*/, 5];
|
|
48
|
+
return [4 /*yield*/, this.userManager.signinSilent()];
|
|
49
|
+
case 4:
|
|
50
|
+
_a.sent();
|
|
51
|
+
return [2 /*return*/, this.user];
|
|
52
|
+
case 5: return [2 /*return*/, null];
|
|
50
53
|
}
|
|
51
54
|
});
|
|
52
55
|
});
|