custom auth pages
The is a post made after @Daniel_Kinde asked. It is about my question on how is the login method implemented / imported when dealing with a nextjs repo ?


<Link
prefetch={false}
className="btn-primary mr-2"
href={{
pathname: "/api/auth/login",
query: {
post_login_redirect_url: "/oops",
login_hint: "sup",
lang: "fr",
},
}}
>
Login
</Link>import { LoginLink } from "@kinde-oss/kinde-auth-nextjs/components";
// In your component or page
<LoginLink>Sign in</LoginLink><LoginLink postLoginRedirectURL="/dashboard">Sign in</LoginLink>import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
const { isAuthenticated, getUser } = getKindeServerSession();
const isAuthed = await isAuthenticated();
const user = await getUser();<button
onClick={() =>
login({
authUrlParams: {
connection_id: "conn_e5f80aa5258e4685bf629b38003ee954"
login_hint: "dave@kinde.com"
}
})
}
>
Sign in with email
</button>const handleSubmit = form.handleSubmit((values: LoginFormSchema) => {
router.push(
`/api/auth/login?connection_id=conn_042914d31856402c814486d324df9188&login_hint=${values.email}&post_login_redirect_url=/auth/callback?email=${values.email}`,
);
});