Last active
January 19, 2022 20:27
-
-
Save dinkydani/64cefb99bb365139028e968ab67c3899 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default () => { | |
useEffect(() => { | |
// get the URL parameters which will include the auth token | |
const params = window.location.search; | |
if (window.opener) { | |
// send them to the opening window | |
window.opener.postMessage(params); | |
// close the popup | |
window.close(); | |
} | |
}); | |
// some text to show the user | |
return <p>Please wait...</p>; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
window.opener is null when using google oauth passport provider. Redirection in popup maybe?