@omni-co/embed 0.8.0 → 0.9.0

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.
@@ -100,16 +100,6 @@ export declare const getSignature: ({ secret, ...props }: SignatureProps) => str
100
100
  type RequestUrl = {
101
101
  requestUrl: string;
102
102
  };
103
- type GenerateSessionSignatureProps = Omit<SignatureProps, "loginUrl" | "prefersDark" | "theme"> & RequestUrl;
104
- /**
105
- * Creates a signature value for the /embed/sso/generate-session endpoint.
106
- *
107
- * For context, the /embed/sso/generate-session endpoint is step 1 of the
108
- * embed 2-step login flow. All requests to this endpoint require a signature
109
- * that is generated based on all other request parameters. That signature is
110
- * validated by the Omni app server to ensure the request is authentic.
111
- */
112
- export declare const signSessionRequest: ({ requestUrl, secret, ...props }: GenerateSessionSignatureProps) => string;
113
103
  type SignSessionRedemptionProps = Pick<SignatureProps, "nonce" | "prefersDark" | "theme" | "secret"> & RequestUrl & {
114
104
  sessionId: string;
115
105
  };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TEST_ONLY = exports.signSessionRedemption = exports.signSessionRequest = exports.getSignature = exports.hmacSign = void 0;
6
+ exports.TEST_ONLY = exports.signSessionRedemption = exports.getSignature = exports.hmacSign = void 0;
7
7
  const crypto_1 = __importDefault(require("crypto"));
8
8
  const base64url_1 = __importDefault(require("base64url"));
9
9
  const hmacSign = (data, secret) => {
@@ -60,18 +60,6 @@ const getSignature = ({ secret, ...props }) => {
60
60
  return (0, exports.hmacSign)(generateStringForSignature(props), secret);
61
61
  };
62
62
  exports.getSignature = getSignature;
63
- /**
64
- * Creates a signature value for the /embed/sso/generate-session endpoint.
65
- *
66
- * For context, the /embed/sso/generate-session endpoint is step 1 of the
67
- * embed 2-step login flow. All requests to this endpoint require a signature
68
- * that is generated based on all other request parameters. That signature is
69
- * validated by the Omni app server to ensure the request is authentic.
70
- */
71
- const signSessionRequest = ({ requestUrl, secret, ...props }) => {
72
- return (0, exports.getSignature)({ secret, loginUrl: requestUrl, ...props });
73
- };
74
- exports.signSessionRequest = signSessionRequest;
75
63
  /**
76
64
  * Creates a signature value for the /embed/sso/redeem-session endpoint.
77
65
  *
@@ -100,16 +100,6 @@ export declare const getSignature: ({ secret, ...props }: SignatureProps) => str
100
100
  type RequestUrl = {
101
101
  requestUrl: string;
102
102
  };
103
- type GenerateSessionSignatureProps = Omit<SignatureProps, "loginUrl" | "prefersDark" | "theme"> & RequestUrl;
104
- /**
105
- * Creates a signature value for the /embed/sso/generate-session endpoint.
106
- *
107
- * For context, the /embed/sso/generate-session endpoint is step 1 of the
108
- * embed 2-step login flow. All requests to this endpoint require a signature
109
- * that is generated based on all other request parameters. That signature is
110
- * validated by the Omni app server to ensure the request is authentic.
111
- */
112
- export declare const signSessionRequest: ({ requestUrl, secret, ...props }: GenerateSessionSignatureProps) => string;
113
103
  type SignSessionRedemptionProps = Pick<SignatureProps, "nonce" | "prefersDark" | "theme" | "secret"> & RequestUrl & {
114
104
  sessionId: string;
115
105
  };
@@ -52,17 +52,6 @@ accessBoost, connectionRoles, customTheme, customThemeId, email, entity, entityF
52
52
  export const getSignature = ({ secret, ...props }) => {
53
53
  return hmacSign(generateStringForSignature(props), secret);
54
54
  };
55
- /**
56
- * Creates a signature value for the /embed/sso/generate-session endpoint.
57
- *
58
- * For context, the /embed/sso/generate-session endpoint is step 1 of the
59
- * embed 2-step login flow. All requests to this endpoint require a signature
60
- * that is generated based on all other request parameters. That signature is
61
- * validated by the Omni app server to ensure the request is authentic.
62
- */
63
- export const signSessionRequest = ({ requestUrl, secret, ...props }) => {
64
- return getSignature({ secret, loginUrl: requestUrl, ...props });
65
- };
66
55
  /**
67
56
  * Creates a signature value for the /embed/sso/redeem-session endpoint.
68
57
  *
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.8.0",
2
+ "version": "0.9.0",
3
3
  "license": "MIT",
4
4
  "name": "@omni-co/embed",
5
5
  "author": "Nate Agrin <nate@exploreomni.com>",