@frontegg/rest-api 7.58.0-alpha.0 → 7.59.0
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/auth/index.d.ts +2 -0
- package/auth/index.js +7 -1
- package/auth/interfaces.d.ts +4 -0
- package/index.js +1 -1
- package/node/auth/index.js +7 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export declare class AuthenticationApi extends BaseApiClient {
|
|
|
49
49
|
* Login with username and password.
|
|
50
50
|
* If the user has two-factor authentication, the server will return mfaToken with mfaRequired: true,
|
|
51
51
|
* and then `loginWithMfa` should be called with the mfaToken and generated code.
|
|
52
|
+
* If the password is expired, the server will return resetPasswordToken.
|
|
53
|
+
* If password rotation configuration is enabled and password not expired, the server will return passwordExpiresIn and notificationPeriod.
|
|
52
54
|
* Otherwise, the server will accessToken and refreshToken.
|
|
53
55
|
* The refresh token should be used to renew your access token by calling `refreshToken`.
|
|
54
56
|
* @throw exception if login failed
|
package/auth/index.js
CHANGED
|
@@ -709,8 +709,14 @@ export class AuthenticationApi extends BaseApiClient {
|
|
|
709
709
|
};
|
|
710
710
|
this.getMeAndEntitlements = async () => {
|
|
711
711
|
const shouldSkipUserLoad = ContextHolder.for(this.appName).shouldSkipUserLoad();
|
|
712
|
+
// introduced this ability to reduce the number of requests to the server in hosted login
|
|
712
713
|
if (shouldSkipUserLoad) {
|
|
713
|
-
return {
|
|
714
|
+
return {
|
|
715
|
+
roles: [],
|
|
716
|
+
permissions: [],
|
|
717
|
+
groups: [],
|
|
718
|
+
tenants: []
|
|
719
|
+
};
|
|
714
720
|
}
|
|
715
721
|
const actions = [{
|
|
716
722
|
action: this.getMeV2,
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export type ILoginResponse = IUserProfile & {
|
|
|
54
54
|
amr?: string[];
|
|
55
55
|
acr?: string;
|
|
56
56
|
auth_time?: number;
|
|
57
|
+
resetPasswordToken?: string;
|
|
58
|
+
passwordExpiresIn?: number;
|
|
59
|
+
notificationPeriod?: number;
|
|
60
|
+
userId?: string;
|
|
57
61
|
};
|
|
58
62
|
export type ILoginResponseV2 = {
|
|
59
63
|
user: ILoginResponse;
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -775,8 +775,14 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
|
|
|
775
775
|
};
|
|
776
776
|
this.getMeAndEntitlements = async () => {
|
|
777
777
|
const shouldSkipUserLoad = _ContextHolder.ContextHolder.for(this.appName).shouldSkipUserLoad();
|
|
778
|
+
// introduced this ability to reduce the number of requests to the server in hosted login
|
|
778
779
|
if (shouldSkipUserLoad) {
|
|
779
|
-
return {
|
|
780
|
+
return {
|
|
781
|
+
roles: [],
|
|
782
|
+
permissions: [],
|
|
783
|
+
groups: [],
|
|
784
|
+
tenants: []
|
|
785
|
+
};
|
|
780
786
|
}
|
|
781
787
|
const actions = [{
|
|
782
788
|
action: this.getMeV2,
|
package/node/index.js
CHANGED