feat: improve FilterModal mobile responsiveness and handle social auth errors via URL parameters
This commit is contained in:
@@ -155,7 +155,8 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
|
||||
(user as any).refreshToken = data.data.refreshToken;
|
||||
} else if (!res.ok) {
|
||||
const errorMsg = data?.message || "Social login failed";
|
||||
return `/login?error=${encodeURIComponent(errorMsg)}`;
|
||||
const returnTo = mode === 'signup' ? '/signup' : '/login';
|
||||
return `${returnTo}?error=${encodeURIComponent(errorMsg)}`;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Social auth sync error:", error);
|
||||
|
||||
Reference in New Issue
Block a user