iboughtbed
iboughtbed
TTCTheo's Typesafe Cult
Created by iboughtbed on 4/16/2024 in #questions
Next Auth Drizzle Adapter does not include extra columns (fields)
Found a workaround: https://github.com/nextauthjs/next-auth/pull/8561 auth.ts
export const authOptions {
...
adapter: {
...(DrizzleAdapter(db, createTable) as Adapter),
// @ts-expect-error drizzle adapter does not include extra columns
async createUser(data) {
return await db
.insert(users)
.values({ ...data, id: crypto.randomUUID() })
.returning()
.then((res) => res[0] ?? null);
},
},
export const authOptions {
...
adapter: {
...(DrizzleAdapter(db, createTable) as Adapter),
// @ts-expect-error drizzle adapter does not include extra columns
async createUser(data) {
return await db
.insert(users)
.values({ ...data, id: crypto.randomUUID() })
.returning()
.then((res) => res[0] ?? null);
},
},
4 replies
TTCTheo's Typesafe Cult
Created by iboughtbed on 1/2/2024 in #questions
next markdown rendering library (NOT MDX) on server
yo, I used react-markdown, and it works fine with SSR and RSC. So I guess just use react-markdown now, to avoid errors with JSX in markdown
9 replies
TTCTheo's Typesafe Cult
Created by iboughtbed on 11/3/2023 in #questions
React query initial data
initialData: {
pageParams: [undefined],
pages: [{ releases: initialReleases, nextId: initialNextId }],
},
initialData: {
pageParams: [undefined],
pages: [{ releases: initialReleases, nextId: initialNextId }],
},
4 replies
TTCTheo's Typesafe Cult
Created by iboughtbed on 6/21/2023 in #questions
How to add a form to "new-user" page after user signed in via provider
About the 1 option: How do i check if it's a new user?
7 replies
TTCTheo's Typesafe Cult
Created by iboughtbed on 6/21/2023 in #questions
How to add a form to "new-user" page after user signed in via provider
7 replies