fix: login redirect missing route (#8990)
Closes #8920 - login form does not redirect after form submit. In `handleAuthRedirect` the route parameter was unintentionally getting overwritten.
This commit is contained in:
committed by
GitHub
parent
d20445b6f3
commit
010ac2ac0c
@@ -21,11 +21,11 @@ export const handleAuthRedirect = ({ config, route, searchParams, user }: Args):
|
||||
delete searchParams.redirect
|
||||
}
|
||||
|
||||
const redirectRoute = encodeURIComponent(
|
||||
route + Object.keys(searchParams ?? {}).length
|
||||
const redirectRoute =
|
||||
(route !== adminRoute ? route : '') +
|
||||
(Object.keys(searchParams ?? {}).length > 0
|
||||
? `${qs.stringify(searchParams, { addQueryPrefix: true })}`
|
||||
: undefined,
|
||||
)
|
||||
: '')
|
||||
|
||||
const redirectTo = formatAdminURL({
|
||||
adminRoute,
|
||||
|
||||
Reference in New Issue
Block a user