Created
April 13, 2020 20:35
-
-
Save JudahGabriel/e715089db38ae1a9c55fcdae67017751 to your computer and use it in GitHub Desktop.
pwa-auth in headless (no UI) mode
This file contains hidden or 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
<pwa-auth appearance="none"></pwa-auth> | |
<button id="myBtn">My Own Sign In Button</button> | |
<script> | |
// Hook up our own button to pwa-auth sign-in flow | |
const pwaAuth = document.querySelector("pwa-auth"); | |
const myBtn = document.querySelector("#myBtn"); | |
myBtn.addEventHandler("click", () => pwaAuth.signIn("Microsoft")); // Or Google or Facebook | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment