gnarley_farley.
gnarley_farley.
Explore posts from servers
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 10/1/2024 in #questions
Latest t3 Template issues
Just nuked a bunched of vscode plugins, working flawlessly now.
3 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 9/26/2024 in #questions
How to setup api service for selling with nextjs t3?
I've explained why I am looking for examples before I get started. If you have any. Feel free to share.
13 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 9/26/2024 in #questions
How to setup api service for selling with nextjs t3?
I can probably rig it up quite easily. BUt I would like a good example with some best practices etc. So I can break it down and compare to my current understanding of how I would do this.
13 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 9/26/2024 in #questions
How to setup api service for selling with nextjs t3?
I mean I need a model for creating api keys and allowing people to use those for making requests to my app programmatically.
13 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
The example doesn't have it which confused me.
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
For anyone searching for future reference on Auth with t3 turbo. I had to pass the client and secret here into the provider option.
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
I got stuck on this part: import type { DefaultSession, NextAuthConfig, Session as NextAuthSession, } from "next-auth"; import { skipCSRFCheck } from "@auth/core"; import { DrizzleAdapter } from "@auth/drizzle-adapter"; import Discord from "next-auth/providers/discord"; import { db } from "@acme/db/client"; import { Account, Session, User } from "@acme/db/schema"; import { env } from "../env"; declare module "next-auth" { interface Session { user: { id: string; } & DefaultSession["user"]; } } const adapter = DrizzleAdapter(db, { usersTable: User, accountsTable: Account, sessionsTable: Session, }); export const isSecureContext = env.NODE_ENV !== "development"; export const authConfig = { adapter, // In development, we need to skip checks to allow Expo to work ...(!isSecureContext ? { skipCSRFCheck: skipCSRFCheck, trustHost: true, } : {}), secret: env.AUTH_SECRET, providers: [Discord], callbacks: { session: (opts) => { if (!("user" in opts)) throw new Error("unreachable with session strategy"); return { ...opts.session, user: { ...opts.session.user, id: opts.user.id, }, }; }, }, } satisfies NextAuthConfig; export const validateToken = async ( token: string, ): Promise<NextAuthSession | null> => { const sessionToken = token.slice("Bearer ".length); const session = await adapter.getSessionAndUser?.(sessionToken); return session ? { user: { ...session.user, }, expires: session.session.expires.toISOString(), } : null; }; export const invalidateSessionToken = async (token: string) => { await adapter.deleteSession?.(token); };
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
Never mind I got it. Thanks for the assistance.
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
Sorry I am busy refactoring moving to the new template a bit lost.
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
Thanks. Almost got it now. Any idea maybe why all my client_id's are null when trying to redirect to github or google or discord. client_id=undefined&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fgithub&code_challenge=VtLtrZoi7gkXpSxD-po66Fy7Rdi7qT5wT_u0tFzE77U&code_challenge_method=S256
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
T3turbo
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 7/24/2024 in #questions
Is there a reason i cannot use "use server" inside buttons anymore like the example shows.
No description
14 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 5/6/2024 in #questions
Error when trying to spin up turbo repo
Same as these issues.
5 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 5/6/2024 in #questions
Error when trying to spin up turbo repo
5 replies
TTCTheo's Typesafe Cult
Created by Ali on 5/29/2023 in #questions
TypeError: Cannot read properties of undefined (reading 'status')
Did you figure this out
13 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 5/6/2024 in #questions
Error when trying to spin up turbo repo
THink these are OS related issues on windows. If anyone has some time please hola.
5 replies
TTCTheo's Typesafe Cult
Created by gnarley_farley. on 12/8/2023 in #questions
What's the best way to handle WebSockets and streaming for these AI apps + t3?
thanks my dude
5 replies
TTCTheo's Typesafe Cult
Created by yellowhammer on 6/5/2023 in #questions
Rich Text Editor
ya shoot me a dm same
27 replies
TTCTheo's Typesafe Cult
Created by yellowhammer on 6/5/2023 in #questions
Rich Text Editor
tailwind typography plugin
27 replies
TTCTheo's Typesafe Cult
Created by yellowhammer on 6/5/2023 in #questions
Rich Text Editor
27 replies