API
GMJSilmaro opened this issue · comments
How does API Work here cause i can't do much and it wont load help ?
Hi, @GMJSilmaro
Please check reply to the same issue, it might be helpful.
Let me know if it works :)
Hi, @sandipthemes how about middleware can you help me how to setup? im really new and i like your template is there anyway to setup it? i want to redirect non authenticated users to your (auth)/authentication/sign-in
If you want to redirect to specific page, you can use below code.
import { useRouter } from "next/navigation";
const Page = () => {
const router = useRouter();
return(<button onClick={() => router.push("/authentication/sign-in")}>Redirect</button>)
}
Please share, which middleware are you using for authentication process.