errorCallbackURL in client side social login is not working

await authClientApi.signIn.social(
    {
        provider: 'google',
        callbackURL: '/dashboard',
        errorCallbackURL: '/login',
    }
);


when i am using authClient to do a social login using google provider i am passing errorCallbackURL key if there is any error ultimately it should redirect me to login page

but when there is api error then instead redirecting to /login with errors as query parameters it is redirecting it to /api/auth/error i guess

am i doing something wrong here not sure never encountered error since i was using it yesterday i reported it i updated it to latest version then also it is hapenning

auth client config
export const authClientApi = createAuthClient({
    baseURL: getBaseUrl()
});
Solution
If state or code is missing on the oauth callback, you won't get redirected to errorCallbackURL. Becasue the error callback url can't be retrieved
Was this page helpful?