Skip to content

Instantly share code, notes, and snippets.

@avizyt
Last active July 6, 2023 14:25
Show Gist options
  • Save avizyt/313362cae17517f86b6f59bd852b18b6 to your computer and use it in GitHub Desktop.
Save avizyt/313362cae17517f86b6f59bd852b18b6 to your computer and use it in GitHub Desktop.
nextjs
// Authentication session
import { getServerSession } from "next-auth/next";
import { NextAuthOptions, User } from "next-auth";
import { AdapterUser } from "next-auth/adapters";
import GoogleProvider from "next-auth/providers/google";
import jsonwebtoken from "jsonwebtoken";
import { JWT } from "next-auth/jwt";
import Google from "next-auth/providers/google";
export const authOptions: NextAuthOptions = {
providers: [
GoogleProvider({
clientId: "",
clientSecret: "",
}),
],
jwt: {
encode: ({ secret, token }) => {},
decode: async ({ secret, token }) => {},
},
theme: {
colorScheme: "light",
logo: "/logo.png",
},
callbacks: {
async session({ session }) {},
async signIn({ user }) {},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment