@tryfinch/react-connect
Advanced tools
Comparing version 3.6.0 to 3.6.1
@@ -31,3 +31,3 @@ import { useRef, useEffect } from 'react'; | ||
// replace with actual SDK version by rollup | ||
authUrl.searchParams.append('sdk_version', 'react-3.6.0'); | ||
authUrl.searchParams.append('sdk_version', 'react-3.6.1'); | ||
return authUrl.href; | ||
@@ -96,2 +96,4 @@ }; | ||
function handleFinchAuth(event) { | ||
const canUseFinchDevMode = combinedOptions.finchDevMode && window.location.hostname === 'localhost'; | ||
const CONNECT_URI = canUseFinchDevMode ? DEV_FINCH_CONNECT_URI : BASE_FINCH_CONNECT_URI; | ||
if (!event.data) | ||
@@ -101,3 +103,3 @@ return; | ||
return; | ||
if (!event.origin.startsWith(BASE_FINCH_CONNECT_URI)) | ||
if (!event.origin.startsWith(CONNECT_URI)) | ||
return; | ||
@@ -104,0 +106,0 @@ close(); |
@@ -35,3 +35,3 @@ 'use strict'; | ||
// replace with actual SDK version by rollup | ||
authUrl.searchParams.append('sdk_version', 'react-3.6.0'); | ||
authUrl.searchParams.append('sdk_version', 'react-3.6.1'); | ||
return authUrl.href; | ||
@@ -100,2 +100,4 @@ }; | ||
function handleFinchAuth(event) { | ||
const canUseFinchDevMode = combinedOptions.finchDevMode && window.location.hostname === 'localhost'; | ||
const CONNECT_URI = canUseFinchDevMode ? DEV_FINCH_CONNECT_URI : BASE_FINCH_CONNECT_URI; | ||
if (!event.data) | ||
@@ -105,3 +107,3 @@ return; | ||
return; | ||
if (!event.origin.startsWith(BASE_FINCH_CONNECT_URI)) | ||
if (!event.origin.startsWith(CONNECT_URI)) | ||
return; | ||
@@ -108,0 +110,0 @@ close(); |
{ | ||
"name": "@tryfinch/react-connect", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"description": "Finch SDK for embedding Finch Connect in API React Single Page Applications (SPA)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -180,5 +180,10 @@ import { useEffect, useRef } from 'react'; | ||
function handleFinchAuth(event: FinchConnectPostMessage) { | ||
const canUseFinchDevMode = | ||
combinedOptions.finchDevMode && window.location.hostname === 'localhost'; | ||
const CONNECT_URI = canUseFinchDevMode ? DEV_FINCH_CONNECT_URI : BASE_FINCH_CONNECT_URI; | ||
if (!event.data) return; | ||
if (event.data.name !== FINCH_AUTH_MESSAGE_NAME) return; | ||
if (!event.origin.startsWith(BASE_FINCH_CONNECT_URI)) return; | ||
if (!event.origin.startsWith(CONNECT_URI)) return; | ||
@@ -185,0 +190,0 @@ close(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
937853
32192