Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API #9

Open
GMJSilmaro opened this issue Jun 12, 2024 · 3 comments
Open

API #9

GMJSilmaro opened this issue Jun 12, 2024 · 3 comments

Comments

@GMJSilmaro
Copy link

How does API Work here cause i can't do much and it wont load help ?

@sandipthemes
Copy link
Collaborator

Hi, @GMJSilmaro

Please check reply to the same issue, it might be helpful.

#7

Let me know if it works :)

@GMJSilmaro
Copy link
Author

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

@sandipthemes
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants