Skip to content

Commit

Permalink
fix: add temp debug msg
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeaturner committed Aug 5, 2024
1 parent ceb9859 commit db194d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/AuthEventListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const AuthEventListener = ({ debug = false, originMatch }: { debug?: boolean, or
}, []);

async function handleMessage(event: MessageEvent) {
console.log("Received message from parent window: ", event);
if (originMatch && event.origin !== originMatch) {
console.error(`Origin ${event.origin} does not match expected value: ${originMatch}`);
}

if (event.data.type !== "AUTH_TOKEN") return
if (event.data.type !== "AUTH_TOKEN") return;
const token = event.data.token;

if (debug) console.log("Received token from parent window: ", token);
Expand Down

0 comments on commit db194d6

Please sign in to comment.