Open
Description
Describe the feature
There is no documentation on how to handle errors from external APIs when signing in using the local provider.
How would you implement this?
The only way I've managed to implement this is to use the following code. I'm not sure if there's any other way.
try {
await signIn(
{email: values.email, password: values.password},
{callbackUrl: "/"}
);
} catch (error) {
setFieldError("password", error?.response._data.detail);
setErrors(error?.response._data);
}
Additional information
- Would you be willing to help implement this feature?
Provider
- AuthJS
- Local
- Refresh
- New Provider