mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 21:51:14 -05:00
Remove debug console logs
This commit is contained in:
@@ -89,11 +89,6 @@ export default function Auth() {
|
||||
setSignInCaptchaToken(null);
|
||||
|
||||
try {
|
||||
console.log('[Auth] Attempting sign in...', {
|
||||
email: formData.email,
|
||||
timestamp: new Date().toISOString(),
|
||||
});
|
||||
|
||||
const {
|
||||
data,
|
||||
error
|
||||
@@ -109,7 +104,6 @@ export default function Auth() {
|
||||
|
||||
// Check if MFA is required (user exists but no session)
|
||||
if (data.user && !data.session) {
|
||||
console.log('[Auth] MFA required');
|
||||
const totpFactor = data.user.factors?.find(f => f.factor_type === 'totp' && f.status === 'verified');
|
||||
|
||||
if (totpFactor) {
|
||||
@@ -127,8 +121,6 @@ export default function Auth() {
|
||||
const postAuthResult = await handlePostAuthFlow(data.session, 'password');
|
||||
|
||||
if (postAuthResult.success && postAuthResult.data.shouldRedirect) {
|
||||
console.log('[Auth] MFA step-up required');
|
||||
|
||||
// Get the TOTP factor ID
|
||||
const { data: factors } = await supabase.auth.mfa.listFactors();
|
||||
const totpFactor = factors?.totp?.find(f => f.status === 'verified');
|
||||
@@ -140,24 +132,16 @@ export default function Auth() {
|
||||
}
|
||||
}
|
||||
|
||||
console.log('[Auth] Sign in successful', {
|
||||
user: data.user?.email,
|
||||
session: !!data.session,
|
||||
sessionExpiry: data.session?.expires_at
|
||||
});
|
||||
|
||||
// Verify session was stored
|
||||
setTimeout(async () => {
|
||||
const { data: { session } } = await supabase.auth.getSession();
|
||||
if (!session) {
|
||||
console.error('[Auth] Session not found after login!');
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: "Session Error",
|
||||
description: "Login succeeded but session was not stored. Please check your browser settings and enable cookies/storage."
|
||||
});
|
||||
} else {
|
||||
console.log('[Auth] Session verified after login');
|
||||
toast({
|
||||
title: "Welcome back!",
|
||||
description: "You've been signed in successfully."
|
||||
@@ -447,18 +431,9 @@ export default function Auth() {
|
||||
<Label>Security Verification</Label>
|
||||
<TurnstileCaptcha
|
||||
key={signInCaptchaKey}
|
||||
onSuccess={(token) => {
|
||||
console.log('Sign-in CAPTCHA success:', token);
|
||||
setSignInCaptchaToken(token);
|
||||
}}
|
||||
onError={(error) => {
|
||||
console.log('Sign-in CAPTCHA error:', error);
|
||||
setSignInCaptchaToken(null);
|
||||
}}
|
||||
onExpire={() => {
|
||||
console.log('Sign-in CAPTCHA expired');
|
||||
setSignInCaptchaToken(null);
|
||||
}}
|
||||
onSuccess={setSignInCaptchaToken}
|
||||
onError={() => setSignInCaptchaToken(null)}
|
||||
onExpire={() => setSignInCaptchaToken(null)}
|
||||
siteKey={import.meta.env.VITE_TURNSTILE_SITE_KEY}
|
||||
theme="auto"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user