@djangocfg/api 2.1.101 → 2.1.102

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 CHANGED
@@ -4698,7 +4698,7 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
4698
4698
  };
4699
4699
  }
4700
4700
  }, [clearAuthState, accounts]);
4701
- const logout = (0, import_react4.useCallback)(async () => {
4701
+ const logout = (0, import_react4.useCallback)(async (options) => {
4702
4702
  const performLogout = /* @__PURE__ */ __name(() => {
4703
4703
  Analytics.event("auth_logout" /* AUTH_LOGOUT */, {
4704
4704
  category: "auth" /* AUTH */
@@ -4709,6 +4709,10 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
4709
4709
  const authCallbackUrl = config?.routes?.defaultAuthCallback || defaultRoutes.defaultAuthCallback;
4710
4710
  router.hardReplace(authCallbackUrl);
4711
4711
  }, "performLogout");
4712
+ if (options?.skipConfirm) {
4713
+ performLogout();
4714
+ return;
4715
+ }
4712
4716
  if (configRef.current?.onConfirm) {
4713
4717
  const { confirmed } = await configRef.current.onConfirm({
4714
4718
  title: "Logout",
@@ -4837,7 +4841,7 @@ var defaultAuthState = {
4837
4841
  authLogger.warn("useAuth: refreshToken called outside AuthProvider");
4838
4842
  return { success: false, message: "AuthProvider not available" };
4839
4843
  }, "refreshToken"),
4840
- logout: /* @__PURE__ */ __name(async () => {
4844
+ logout: /* @__PURE__ */ __name(async (_options) => {
4841
4845
  authLogger.warn("useAuth: logout called outside AuthProvider");
4842
4846
  }, "logout"),
4843
4847
  saveRedirectUrl: /* @__PURE__ */ __name(() => {