FEAT: OAuth now redirects to last URL signed in

UPDATE: Created the page to display lists of categories
This commit is contained in:
JustIceO7
2025-02-11 23:08:26 +00:00
parent 4a4fde9256
commit 1b167b60f1
5 changed files with 20 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ import { useEffect } from "react";
export default function GoogleLogin() {
const handleLoginClick = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
window.location.href = "/api/login/google";
const nextUrl = encodeURIComponent(window.location.href);
window.location.href = `/api/login/google?next=${nextUrl}`;
};
return (