fix(front): tolérer messages si origin OK même si source !== iframeRef (postMessage)
All checks were successful
build-and-push-ext / build_push (push) Successful in 59s
All checks were successful
build-and-push-ext / build_push (push) Successful in 59s
This commit is contained in:
parent
6ad0b5c339
commit
6cfeb5cab8
@ -31,12 +31,13 @@ export default function AuthModal({ isOpen, onClose }: AuthModalProps) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.source !== iframeRef.current.contentWindow) {
|
||||
const targetOrigin = IframeReference.getTargetOrigin();
|
||||
const fromIframe = event.source === iframeRef.current.contentWindow;
|
||||
const sameOrigin = event.origin === targetOrigin;
|
||||
if (!fromIframe && !sameOrigin) {
|
||||
console.error('[AuthModal] handleMessage: source not match');
|
||||
return;
|
||||
}
|
||||
|
||||
const targetOrigin = IframeReference.getTargetOrigin();
|
||||
if (!targetOrigin) {
|
||||
console.error('[AuthModal] handleMessage: targetOrigin not found');
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user