mirror of
https://github.com/hexahigh/portfolio.git
synced 2025-12-12 03:25:06 +01:00
16 lines
382 B
JavaScript
16 lines
382 B
JavaScript
import { auth } from "./firebaseLoader.js";
|
|
|
|
// Check if google sign up button is pressed
|
|
document.getElementById("googleSignButton").addEventListener("click", function () {
|
|
signInWithRedirect(auth, provider);
|
|
});
|
|
|
|
|
|
|
|
auth().onAuthStateChanged(function (user) {
|
|
if (user) {
|
|
window.location.href="ui/index.html";
|
|
} else {
|
|
// No user is signed in.
|
|
}
|
|
}); |