We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 590b08e commit ef8be4bCopy full SHA for ef8be4b
src/app/login/LoginForm.tsx
@@ -47,8 +47,10 @@ export default function LoginForm() {
47
localStorage.setItem('auth_token', data.token);
48
}
49
50
- // Redirect based on admin status
51
- if (data.merchant?.is_admin) {
+ // Redirect: honour OAuth / external redirect if present
+ if (redirectTo) {
52
+ router.push(redirectTo);
53
+ } else if (data.merchant?.is_admin) {
54
router.push('/admin');
55
} else {
56
router.push('/dashboard');
0 commit comments