feat: add section color coding to lesson title h2
The lesson title now uses section-specific colors: - CSS: purple (#9163b8) - HTML: pink (#d45aa0) - Tailwind: teal (#1aafb8) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
18
src/auth.js
18
src/auth.js
@@ -33,15 +33,7 @@ export async function initAuth(engine) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check initial session
|
||||
try {
|
||||
const { data } = await authModule.getUser();
|
||||
if (data?.user) handleLogin(data.user);
|
||||
} catch (e) {
|
||||
console.log("Auth check failed:", e.message);
|
||||
}
|
||||
|
||||
// Listen for auth changes
|
||||
// Listen for auth changes FIRST (catches OAuth callback)
|
||||
authModule.onAuthStateChange((event, session) => {
|
||||
if (event === "SIGNED_IN" && session?.user) {
|
||||
handleLogin(session.user);
|
||||
@@ -50,6 +42,14 @@ export async function initAuth(engine) {
|
||||
}
|
||||
});
|
||||
|
||||
// Check initial session (getSession handles OAuth callback URL)
|
||||
try {
|
||||
const { data } = await authModule.getSession();
|
||||
if (data?.session?.user) handleLogin(data.session.user);
|
||||
} catch (e) {
|
||||
console.log("Auth check failed:", e.message);
|
||||
}
|
||||
|
||||
// Attach form handlers
|
||||
setupAuthForms();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user