Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
MFelipeG authored Mar 9, 2025
1 parent 4bdf290 commit 44367a6
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,49 +73,6 @@ <h3>Apoie Nosso Canal</h3>
<p id="wallet-text"></p>
<button onclick="hideWallet()">Fechar</button>
</div>
<!-- Firebase e botão de login -->
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-app.js";
import { getAuth, signInWithPopup, GoogleAuthProvider } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-auth.js";

// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyC-1lZOaGZLOZ-RWL1IX9FnY4LJXUPyXW0",
authDomain: "infocrypto-2025.firebaseapp.com",
projectId: "infocrypto-2025",
storageBucket: "infocrypto-2025.appspot.com",
messagingSenderId: "817973626061",
appId: "1:817973626061:web:1aeaf14ea9b908592e9584",
measurementId: "G-5HKM77NY9B"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);

// Função para adicionar o botão de login
function addLoginButton() {
const loginContainer = document.getElementById('login-container');
const loginButton = document.createElement('button');
loginButton.textContent = 'Login com Google';
loginButton.classList.add('login-button');
loginButton.onclick = () => {
const provider = new GoogleAuthProvider();
signInWithPopup(auth, provider)
.then((result) => {
const user = result.user;
alert(`Bem-vindo, ${user.displayName}!`);
})
.catch((error) => {
console.error('Erro ao fazer login:', error);
});
};
loginContainer.appendChild(loginButton);
}

// Adiciona o botão de login ao carregar a página
document.addEventListener('DOMContentLoaded', addLoginButton);
</script>
<script src="script.js"></script>
</body>
</html>

0 comments on commit 44367a6

Please sign in to comment.