@djangocfg/api 2.1.618 → 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 +2 -2
- 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.mjs
CHANGED
|
@@ -951,6 +951,9 @@ function installAuthOnClient(client2) {
|
|
|
951
951
|
});
|
|
952
952
|
client2.interceptors.response.use(async (response, request) => {
|
|
953
953
|
if (response.status !== 401) return response;
|
|
954
|
+
if (/\/accounts\/(otp|oauth|login|register|token)\b/.test(request.url)) {
|
|
955
|
+
return response;
|
|
956
|
+
}
|
|
954
957
|
if (request.headers.get(RETRY_MARKER)) {
|
|
955
958
|
expireSession(response);
|
|
956
959
|
return response;
|
|
@@ -4996,6 +4999,7 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
|
|
|
4996
4999
|
purgeLegacyTokenStorage();
|
|
4997
5000
|
if (accountsRef.current.profile) accountsRef.current.logout();
|
|
4998
5001
|
}
|
|
5002
|
+
if (auth.isAuthenticated()) return;
|
|
4999
5003
|
setProfileSettled(true);
|
|
5000
5004
|
return;
|
|
5001
5005
|
}
|