errorCallbackURL in client side social login is not working

await authClientApi.signIn.social(
{
provider: 'google',
callbackURL: '/dashboard',
errorCallbackURL: '/login',
}
);
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()
});
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
Jump to solution
3 Replies
Akash Kumar
Akash KumarOP2mo ago
#bug-reports is this really so negligible bug no is interested ?
Solution
bekacru
bekacru2mo ago
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
Akash Kumar
Akash KumarOP2mo ago
code ? is it that one which comes from google for exchanging it for tokens . i see thanks for those case i will have to handle it in other way

Did you find this page helpful?