mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 13:31:14 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -10,6 +10,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/com
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
|
||||
export default function AuthCallback() {
|
||||
const navigate = useNavigate();
|
||||
@@ -124,14 +125,15 @@ export default function AuthCallback() {
|
||||
navigate('/');
|
||||
}, 500);
|
||||
|
||||
} catch (error: any) {
|
||||
console.error('[AuthCallback] Error:', error);
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('[AuthCallback] Error:', errorMsg);
|
||||
setStatus('error');
|
||||
|
||||
toast({
|
||||
variant: 'destructive',
|
||||
title: 'Sign in error',
|
||||
description: error.message || 'An error occurred during sign in. Please try again.',
|
||||
description: errorMsg,
|
||||
});
|
||||
|
||||
// Redirect to auth page after error
|
||||
@@ -183,12 +185,13 @@ export default function AuthCallback() {
|
||||
navigate('/auth');
|
||||
}, 1500);
|
||||
|
||||
} catch (error: any) {
|
||||
console.error('[AuthCallback] Password reset error:', error);
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('[AuthCallback] Password reset error:', errorMsg);
|
||||
toast({
|
||||
variant: 'destructive',
|
||||
title: 'Failed to set password',
|
||||
description: error.message || 'Please try again.',
|
||||
description: errorMsg,
|
||||
});
|
||||
setSettingPassword(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user