@djangocfg/api 2.1.617 → 2.1.619
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/auth.cjs +4 -0
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +4 -0
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +3 -0
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.mjs +3 -0
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +3 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.mjs +3 -0
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/_api/generated/helpers/auth.ts +6 -0
- package/src/auth/__tests__/signInRefusal.test.ts +52 -0
- package/src/auth/context/AuthContext.tsx +4 -0
package/dist/auth.cjs
CHANGED
|
@@ -1208,6 +1208,9 @@ function installAuthOnClient(client2) {
|
|
|
1208
1208
|
});
|
|
1209
1209
|
client2.interceptors.response.use(async (response, request) => {
|
|
1210
1210
|
if (response.status !== 401) return response;
|
|
1211
|
+
if (/\/accounts\/(otp|oauth|login|register|token)\b/.test(request.url)) {
|
|
1212
|
+
return response;
|
|
1213
|
+
}
|
|
1211
1214
|
if (request.headers.get(RETRY_MARKER)) {
|
|
1212
1215
|
expireSession(response);
|
|
1213
1216
|
return response;
|
|
@@ -5245,6 +5248,7 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
|
|
|
5245
5248
|
purgeLegacyTokenStorage();
|
|
5246
5249
|
if (accountsRef.current.profile) accountsRef.current.logout();
|
|
5247
5250
|
}
|
|
5251
|
+
if (auth.isAuthenticated()) return;
|
|
5248
5252
|
setProfileSettled(true);
|
|
5249
5253
|
return;
|
|
5250
5254
|
}
|