VC: Viewer Context and Principal
Integrate with e.g. Google Auth
import NextAuth from "next-auth";
import GoogleProvider from "next-auth/providers/google";
const handler = NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],
});
export { handler as GET, handler as POST };Build a Request VC Accessor Function
Use getServerVC() in Your Server Components and APIs
Last updated