@ollaid/native-sso 2.8.3 → 2.8.4
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/dist/index.cjs +15 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/services/api.d.ts +2 -0
- package/dist/types/native.d.ts +1 -0
- package/docs/10_login-redirect.md +1 -1
- package/docs/11_session-refresh-resilience.md +1 -1
- package/docs/12_login_mode.md +1 -1
- package/docs/13_must_have_working.md +1 -1
- package/docs/14_backend_env_key.md +2 -1
- package/docs/1_quick-start.md +1 -1
- package/docs/2_backend-contract.md +3 -2
- package/docs/3_storage-security.md +1 -1
- package/docs/4_webhooks.md +1 -1
- package/docs/5_iam-account.md +1 -1
- package/docs/6_advanced-services.md +1 -1
- package/docs/7_migration-notes.md +1 -1
- package/docs/8_update_infos.md +1 -1
- package/docs/9_password_magic_link.md +1 -1
- package/docs/README.md +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7114,6 +7114,7 @@ let config = {
|
|
|
7114
7114
|
iamApiUrl: "",
|
|
7115
7115
|
timeout: 3e4,
|
|
7116
7116
|
debug: false,
|
|
7117
|
+
bypass: false,
|
|
7117
7118
|
configPrefix: "iam"
|
|
7118
7119
|
};
|
|
7119
7120
|
const memoryStorage = () => {
|
|
@@ -7784,12 +7785,15 @@ const nativeAuthService = {
|
|
|
7784
7785
|
};
|
|
7785
7786
|
credentialsLoadedAt = Date.now();
|
|
7786
7787
|
credentialsTtl = response.credentials_ttl || DEFAULT_TTL;
|
|
7788
|
+
const currentConfig = getNativeAuthConfig();
|
|
7787
7789
|
if (typeof response.debug === "boolean") {
|
|
7788
|
-
const currentConfig = getNativeAuthConfig();
|
|
7789
7790
|
if (currentConfig.debug !== true) {
|
|
7790
7791
|
setNativeAuthConfig({ debug: response.debug });
|
|
7791
7792
|
}
|
|
7792
7793
|
}
|
|
7794
|
+
if (typeof response.bypass === "boolean") {
|
|
7795
|
+
setNativeAuthConfig({ bypass: response.bypass });
|
|
7796
|
+
}
|
|
7793
7797
|
if (isDebugMode()) {
|
|
7794
7798
|
console.log("✅ [SaaS] Credentials chargés (ttl:", credentialsTtl, "s, debug:", response.debug ?? "non défini", ")");
|
|
7795
7799
|
}
|
|
@@ -7830,7 +7834,7 @@ const nativeAuthService = {
|
|
|
7830
7834
|
`${config2.iamApiUrl}/iam/native/encrypt`,
|
|
7831
7835
|
{
|
|
7832
7836
|
method: "POST",
|
|
7833
|
-
headers: getHeaders(),
|
|
7837
|
+
headers: getHeaders(void 0, true),
|
|
7834
7838
|
body: JSON.stringify(payload)
|
|
7835
7839
|
},
|
|
7836
7840
|
config2.timeout || 3e4
|
|
@@ -7853,7 +7857,7 @@ const nativeAuthService = {
|
|
|
7853
7857
|
`${config2.iamApiUrl}/iam/native/init`,
|
|
7854
7858
|
{
|
|
7855
7859
|
method: "POST",
|
|
7856
|
-
headers: getHeaders(),
|
|
7860
|
+
headers: getHeaders(void 0, true),
|
|
7857
7861
|
body: JSON.stringify({ native_token: nativeToken })
|
|
7858
7862
|
},
|
|
7859
7863
|
config2.timeout || 3e4
|
|
@@ -7876,7 +7880,7 @@ const nativeAuthService = {
|
|
|
7876
7880
|
`${config2.iamApiUrl}/iam/native/validate`,
|
|
7877
7881
|
{
|
|
7878
7882
|
method: "POST",
|
|
7879
|
-
headers: getHeaders(),
|
|
7883
|
+
headers: getHeaders(void 0, true),
|
|
7880
7884
|
body: JSON.stringify({
|
|
7881
7885
|
process_token: processToken,
|
|
7882
7886
|
...creds
|
|
@@ -7905,7 +7909,7 @@ const nativeAuthService = {
|
|
|
7905
7909
|
`${config2.iamApiUrl}/iam/native/verify-totp`,
|
|
7906
7910
|
{
|
|
7907
7911
|
method: "POST",
|
|
7908
|
-
headers: getHeaders(),
|
|
7912
|
+
headers: getHeaders(void 0, true),
|
|
7909
7913
|
body: JSON.stringify({
|
|
7910
7914
|
process_token: processToken,
|
|
7911
7915
|
totp_code: totpCode
|
|
@@ -7927,7 +7931,7 @@ const nativeAuthService = {
|
|
|
7927
7931
|
`${config2.iamApiUrl}/iam/native/grant-access`,
|
|
7928
7932
|
{
|
|
7929
7933
|
method: "POST",
|
|
7930
|
-
headers: getHeaders(),
|
|
7934
|
+
headers: getHeaders(void 0, true),
|
|
7931
7935
|
body: JSON.stringify({ process_token: processToken })
|
|
7932
7936
|
},
|
|
7933
7937
|
config2.timeout || 3e4
|
|
@@ -7946,7 +7950,7 @@ const nativeAuthService = {
|
|
|
7946
7950
|
`${config2.iamApiUrl}/iam/native/resend-otp`,
|
|
7947
7951
|
{
|
|
7948
7952
|
method: "POST",
|
|
7949
|
-
headers: getHeaders(),
|
|
7953
|
+
headers: getHeaders(void 0, true),
|
|
7950
7954
|
body: JSON.stringify({ process_token: processToken })
|
|
7951
7955
|
},
|
|
7952
7956
|
config2.timeout || 3e4
|
|
@@ -8235,8 +8239,7 @@ function getIAMHeaders() {
|
|
|
8235
8239
|
throw new ApiError("Credentials non chargés. Appelez loadCredentials() d'abord.", "auth");
|
|
8236
8240
|
}
|
|
8237
8241
|
return {
|
|
8238
|
-
|
|
8239
|
-
"Accept": "application/json",
|
|
8242
|
+
...getHeaders(void 0, true),
|
|
8240
8243
|
"X-IAM-App-Key": creds.appKey
|
|
8241
8244
|
};
|
|
8242
8245
|
}
|
|
@@ -10968,7 +10971,7 @@ const mobileRegistrationService = {
|
|
|
10968
10971
|
`${config2.iamApiUrl}/iam/native/validate`,
|
|
10969
10972
|
{
|
|
10970
10973
|
method: "POST",
|
|
10971
|
-
headers: getHeaders(),
|
|
10974
|
+
headers: getHeaders(void 0, true),
|
|
10972
10975
|
body: JSON.stringify({
|
|
10973
10976
|
process_token: processToken,
|
|
10974
10977
|
otp_code: otpCode
|
|
@@ -10990,7 +10993,7 @@ const mobileRegistrationService = {
|
|
|
10990
10993
|
`${config2.iamApiUrl}/iam/native/validate`,
|
|
10991
10994
|
{
|
|
10992
10995
|
method: "POST",
|
|
10993
|
-
headers: getHeaders(),
|
|
10996
|
+
headers: getHeaders(void 0, true),
|
|
10994
10997
|
body: JSON.stringify({
|
|
10995
10998
|
process_token: processToken,
|
|
10996
10999
|
password,
|
|
@@ -11013,7 +11016,7 @@ const mobileRegistrationService = {
|
|
|
11013
11016
|
`${config2.iamApiUrl}/iam/native/validate`,
|
|
11014
11017
|
{
|
|
11015
11018
|
method: "POST",
|
|
11016
|
-
headers: getHeaders(),
|
|
11019
|
+
headers: getHeaders(void 0, true),
|
|
11017
11020
|
body: JSON.stringify({
|
|
11018
11021
|
process_token: processToken
|
|
11019
11022
|
})
|