@melio-eng/web-sdk 1.0.16-pr.31.f832550 → 1.0.16

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -80,8 +80,7 @@ class Flow {
80
80
  // Add post message handlers for internal events - setHeight, scroll etc
81
81
  // Also need to implement callbacks for flow completed exit etc in the platform-app
82
82
  window.addEventListener('message', (event) => {
83
- // Verify origin for security
84
- if (event.origin !== 'https://app.melio.com') {
83
+ if (!/melio\.com|melioservices\.com/.test(event.origin)) {
85
84
  return;
86
85
  }
87
86
  const { type, data } = event.data;
@@ -103,7 +102,7 @@ class Flow {
103
102
  case 'AUTHENTICATION_SUCCESS':
104
103
  this.emit('authenticationSucceeded');
105
104
  break;
106
- case 'AUTHENTICATION_FAILED':
105
+ case 'AUTHENTICATION_ERROR':
107
106
  this.emit('authenticationFailed');
108
107
  break;
109
108
  case 'ONBOARDING_COMPLETED':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melio-eng/web-sdk",
3
- "version": "1.0.16-pr.31.f832550",
3
+ "version": "1.0.16",
4
4
  "description": "Melio Web SDK - Embed core Melio workflows directly into partner UI with minimal effort",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",