@elliemae/pui-app-sdk 5.10.5 → 5.10.6

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.
@@ -119,7 +119,7 @@ const authorize = async ({
119
119
  scope,
120
120
  redirectUri
121
121
  });
122
- (0, import_loginParams.setLoginParams)({ clientId, scope, responseType, redirectUri, code });
122
+ (0, import_loginParams.setLoginParams)({ clientId, scope, responseType, redirectUri });
123
123
  const authorizationToken = `${tokenType} ${accessToken}`;
124
124
  (0, import_helper.setAuthorizationHeader)(authorizationToken);
125
125
  const introspectResponse = await (0, import_auth.introspectToken)({
@@ -24,6 +24,6 @@ __export(loginParams_exports, {
24
24
  module.exports = __toCommonJS(loginParams_exports);
25
25
  let loginParams;
26
26
  const setLoginParams = (params) => {
27
- loginParams = params;
27
+ loginParams = { redirectUri: new URL(window.location.href).href, ...params };
28
28
  };
29
29
  const getLoginParams = () => loginParams;
@@ -39,6 +39,7 @@ var import_auth = require("../sideeffect/auth/index.js");
39
39
  var import_login = require("./login/index.js");
40
40
  var import_auth2 = require("../utils/auth/index.js");
41
41
  var import_props = require("../communication/http-client/props.js");
42
+ var import_loginParams = require("../utils/auth/loginParams.js");
42
43
  const key = "auth";
43
44
  const RequireAuth = ({
44
45
  children,
@@ -55,6 +56,7 @@ const RequireAuth = ({
55
56
  import_props.httpClientProps.endSession = import_auth2.endSession;
56
57
  const userAuthorized = (0, import_auth2.isUserAuthorized)();
57
58
  if (userAuthorized) {
59
+ (0, import_loginParams.setLoginParams)({ clientId, scope, responseType });
58
60
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
59
61
  }
60
62
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthManager, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_login.Login, { clientId, scope, responseType, children }) });
@@ -95,7 +95,7 @@ const authorize = async ({
95
95
  scope,
96
96
  redirectUri
97
97
  });
98
- setLoginParams({ clientId, scope, responseType, redirectUri, code });
98
+ setLoginParams({ clientId, scope, responseType, redirectUri });
99
99
  const authorizationToken = `${tokenType} ${accessToken}`;
100
100
  setAuthorizationHeader(authorizationToken);
101
101
  const introspectResponse = await introspectToken({
@@ -1,6 +1,6 @@
1
1
  let loginParams;
2
2
  const setLoginParams = (params) => {
3
- loginParams = params;
3
+ loginParams = { redirectUri: new URL(window.location.href).href, ...params };
4
4
  };
5
5
  const getLoginParams = () => loginParams;
6
6
  export {
@@ -6,6 +6,7 @@ import { authentication } from "../sideeffect/auth/index.js";
6
6
  import { Login } from "./login/index.js";
7
7
  import { endSession, isUserAuthorized } from "../utils/auth/index.js";
8
8
  import { httpClientProps } from "../communication/http-client/props.js";
9
+ import { setLoginParams } from "../utils/auth/loginParams.js";
9
10
  const key = "auth";
10
11
  const RequireAuth = ({
11
12
  children,
@@ -22,6 +23,7 @@ const RequireAuth = ({
22
23
  httpClientProps.endSession = endSession;
23
24
  const userAuthorized = isUserAuthorized();
24
25
  if (userAuthorized) {
26
+ setLoginParams({ clientId, scope, responseType });
25
27
  return /* @__PURE__ */ jsx(Fragment, { children });
26
28
  }
27
29
  return /* @__PURE__ */ jsx(AuthManager, { children: /* @__PURE__ */ jsx(Login, { clientId, scope, responseType, children }) });
@@ -3,8 +3,9 @@ type LoginParams = {
3
3
  scope: string;
4
4
  responseType: string;
5
5
  redirectUri: string;
6
- code: string;
7
6
  };
8
- export declare const setLoginParams: (params: LoginParams) => void;
7
+ export declare const setLoginParams: (params: Omit<LoginParams, 'redirectUri'> & {
8
+ redirectUri?: string;
9
+ }) => void;
9
10
  export declare const getLoginParams: () => LoginParams;
10
11
  export {};
@@ -3,6 +3,6 @@ export type EndSessionFn = (params: {
3
3
  redirectUri: string;
4
4
  responseType: string;
5
5
  scope: string;
6
- code: string;
6
+ code?: string;
7
7
  skipRevoke?: boolean;
8
8
  }) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "5.10.5",
3
+ "version": "5.10.6",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",