fix redirect on requireLoggedIn()
This commit is contained in:
parent
9c9b4a5af4
commit
29f405290c
@ -15,8 +15,9 @@ const action: ActionFunction = async ({ request }) => {
|
|||||||
|
|
||||||
const searchParams = new URL(request.url).searchParams;
|
const searchParams = new URL(request.url).searchParams;
|
||||||
const redirectTo = searchParams.get("redirectTo");
|
const redirectTo = searchParams.get("redirectTo");
|
||||||
|
const successRedirect = redirectTo ? decodeURIComponent(redirectTo) : null;
|
||||||
const { email, password } = validation.data;
|
const { email, password } = validation.data;
|
||||||
return authenticate({ email, password, request, successRedirect: redirectTo });
|
return authenticate({ email, password, request, successRedirect });
|
||||||
};
|
};
|
||||||
|
|
||||||
export default action;
|
export default action;
|
||||||
|
Loading…
Reference in New Issue
Block a user