bitwarden-estensione-browser/src/content/sso.ts

13 lines
402 B
TypeScript
Raw Normal View History

window.addEventListener("message", function(event) {
if (event.source != window)
return;
2020-08-14 22:20:16 +02:00
if (event.data.command && (event.data.command == "authResult")) {
chrome.runtime.sendMessage({
2020-08-14 22:20:16 +02:00
command: event.data.command,
code: event.data.code,
state: event.data.state,
referrer: event.source.location.hostname
});
}
}, false)