1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00
Files
browser/src/content/sso.ts
2020-08-14 15:20:16 -05:00

13 lines
402 B
TypeScript

window.addEventListener("message", function(event) {
if (event.source != window)
return;
if (event.data.command && (event.data.command == "authResult")) {
chrome.runtime.sendMessage({
command: event.data.command,
code: event.data.code,
state: event.data.state,
referrer: event.source.location.hostname
});
}
}, false)