Shouldnt it be `authWindow.location.origin`?