-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathfirebase-test.html
More file actions
51 lines (42 loc) · 2.56 KB
/
firebase-test.html
File metadata and controls
51 lines (42 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Firebase Test</title>
<!-- Firebase SDK -->
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-database-compat.js"></script>
<script type="module" src="./assets/js/firebase.js"></script>
</head>
<body>
<h1>Firebase Services Test</h1>
<div id="results"></div>
<script>
function displayResults() {
const resultsDiv = document.getElementById('results');
let html = '<h2>Test Results:</h2>';
// Test if Firebase is loaded
html += '<p><strong>Firebase Loaded:</strong> ' + (typeof firebase !== 'undefined' ? 'Yes' : 'No') + '</p>';
// Test if firebaseServices is available
html += '<p><strong>firebaseServices Available:</strong> ' + (typeof firebaseServices !== 'undefined' ? 'Yes' : 'No') + '</p>';
if (typeof firebaseServices !== 'undefined') {
// List available services
const services = Object.keys(firebaseServices);
html += '<p><strong>Available Services:</strong> ' + services.join(', ') + '</p>';
// Check specific required services
html += '<p><strong>Auth Service:</strong> ' + (firebaseServices.auth ? 'Available' : 'Not Available') + '</p>';
html += '<p><strong>RTDB Service:</strong> ' + (firebaseServices.rtdb ? 'Available' : 'Not Available') + '</p>';
// Check specific methods
html += '<p><strong>signInWithEmailAndPassword:</strong> ' + (typeof firebaseServices.signInWithEmailAndPassword === 'function' ? 'Available' : 'Not Available') + '</p>';
html += '<p><strong>createUserWithEmailAndPassword:</strong> ' + (typeof firebaseServices.createUserWithEmailAndPassword === 'function' ? 'Available' : 'Not Available') + '</p>';
html += '<p><strong>fetchSignInMethodsForEmail:</strong> ' + (typeof firebaseServices.fetchSignInMethodsForEmail === 'function' ? 'Available' : 'Not Available') + '</p>';
}
resultsDiv.innerHTML = html;
}
// Wait a bit for everything to load
setTimeout(displayResults, 2000);
</script>
</body>
</html>