prostgles-client 4.0.237 → 4.0.238

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.
@@ -30,7 +30,7 @@ type AuthStateLoggedIn<U extends UserLike = UserLike> = LoginSignupOptions & {
30
30
  logout: () => Promise<any>;
31
31
  };
32
32
  export type AuthHandler<U extends UserLike = UserLike> = AuthStateLoggedOut | AuthStateLoggedIn<U>;
33
- export declare const setupAuth: ({ authData: authConfig, socket, onReload }: Args) => AuthHandler;
33
+ export declare const getAuthHandler: ({ authData: authConfig, socket, onReload }: Args) => AuthHandler;
34
34
  export declare const authRequest: <T extends (import("prostgles-types").CommonAuthFailure & {
35
35
  /**
36
36
  * This is a client-only property that is obtained from server redirect response
@@ -107,4 +107,4 @@ export declare const authRequest: <T extends (import("prostgles-types").CommonAu
107
107
  redirect_url?: string | undefined;
108
108
  })>(path: string, data: object, method?: "GET" | "POST") => Promise<T>;
109
109
  export {};
110
- //# sourceMappingURL=Auth.d.ts.map
110
+ //# sourceMappingURL=getAuthHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAuthHandler.d.ts","sourceRoot":"","sources":["../lib/getAuthHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAIzB,KAAK,IAAI,GAAG;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,KAAK,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;AAEzE,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;A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O,MAAM,cAAc,+CAAgD,IAAI,KAAG,WA8EjF,CAAC;AAOF,eAAO,MAAM,WAAW;IA9HtB;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;IAFH;;OAEG;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;UA6HG,MAAM,QACN,MAAM,WACH,KAAK,GAAG,MAAM,eAgCxB,CAAC"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.authRequest = exports.setupAuth = void 0;
3
+ exports.authRequest = exports.getAuthHandler = void 0;
4
4
  const prostgles_types_1 = require("prostgles-types");
5
5
  const prostgles_1 = require("./prostgles");
6
- const setupAuth = ({ authData: authConfig, socket, onReload }) => {
6
+ const getAuthHandler = ({ authData: authConfig, socket, onReload }) => {
7
7
  if ((authConfig === null || authConfig === void 0 ? void 0 : authConfig.pathGuard) && prostgles_1.isClientSide) {
8
8
  const doReload = (res) => {
9
9
  if (res === null || res === void 0 ? void 0 : res.shouldReload) {
@@ -70,7 +70,7 @@ const setupAuth = ({ authData: authConfig, socket, onReload }) => {
70
70
  ...loginSignupOptions,
71
71
  };
72
72
  };
73
- exports.setupAuth = setupAuth;
73
+ exports.getAuthHandler = getAuthHandler;
74
74
  const addSearchInCaseItHasReturnUrl = (url) => {
75
75
  const { search } = window.location;
76
76
  return url + search;