Rinshin
Rinshin
BABetter Auth
Created by Rinshin on 4/6/2025 in #bug-reports
authClient.signIn.email returns status 0 with empty statusText — No descriptive error
I'm trying to implement email/password sign-in using authClient.signIn.email inside a React Native (Expo) project, but I’m getting a bland, unhelpful error message:
Copy
Edit
(NOBRIDGE) LOG Email Sign-In Error: {"status": 0, "statusText": ""}
(NOBRIDGE) LOG User: {"data": null, "error": {"status": 0, "statusText": ""}}
Copy
Edit
(NOBRIDGE) LOG Email Sign-In Error: {"status": 0, "statusText": ""}
(NOBRIDGE) LOG User: {"data": null, "error": {"status": 0, "statusText": ""}}
Code :
const handleEmailLogin = async () => {
try {
const user = await authClient.signIn.email(
{
email,
password,
},
{
onError(ctx) {
console.log('Email Sign-In Error:', ctx.error);
},
},
);

console.log('User:', user);
router.replace('/home');
} catch (error: any) {
console.error('Email Sign-In Error:', error);
Alert.alert(
'Sign In Failed',
error.message || 'An error occurred during sign in.',
);
}
};
const handleEmailLogin = async () => {
try {
const user = await authClient.signIn.email(
{
email,
password,
},
{
onError(ctx) {
console.log('Email Sign-In Error:', ctx.error);
},
},
);

console.log('User:', user);
router.replace('/home');
} catch (error: any) {
console.error('Email Sign-In Error:', error);
Alert.alert(
'Sign In Failed',
error.message || 'An error occurred during sign in.',
);
}
};
6 replies