Files
Job-Info/frontend/src/app.js
T
2025-11-28 11:55:01 -06:00

23 lines
564 B
JavaScript

import { initializeAuth, getToken } from "./auth.js";
import { log, error } from "./logger.js";
async function startApp() {
log("App starting...");
await initializeAuth();
try {
const token = await getToken();
log("Final acquired token:", token.slice(0, 30) + "...");
document.querySelector("#content").textContent =
"Logged in successfully. Token acquired.";
} catch (e) {
error("Failed to authenticate:", e);
document.querySelector("#content").textContent =
"Authentication failed. Check console.";
}
}
startApp();