I forked create-t3-turbo
and added supabase auth instead of NextAuth
#1247
jasonrobwebster
started this conversation in
Show and tell
Replies: 1 comment
-
I'm looking for something similar, but using But i'm faced with this Error: `cookies` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
at getExpectedRequestStore (/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js:48:11)
at cookies (apps/nextjs/.next/server/chunks/08b5e_next_a123c7._.js:6593:84)
at getUser (//apps/nextjs/.next/server/chunks/[root of the server]__510ad3._.js:1035:179)
at auth (/apps/nextjs/.next/server/chunks/[root of the server]__510ad3._.js:1026:24)
at [project]/apps/nextjs/src/app/api/trpc/[trpc]/route.ts [app-route] (ecmascript)
apps/nextjs/.next/server/chunks/[root of the server]__510ad3._.js:10530:162)
at instantiateModule (/apps/nextjs/.next/server/chunks/[turbopack]_runtime.js:589:23)
at getOrInstantiateModuleFromParent (
/apps/nextjs/.next/server/chunks/[turbopack]_runtime.js:644:12)
at esmImport (apps/nextjs/.next/server/chunks/[turbopack]_runtime.js:132:20)
at [project]/node_modules/next/dist/esm/build/templates/app-route.js { INNER_APP_ROUTE => "[project]/apps/nextjs/src/app/api/trpc/[trpc]/route.ts [app-route] (ecmascript)" } [app-route] (ecmascript) (/apps/nextjs/.next/server/chunks/[project]__e2fc59._.js:25:172)
at instantiateModule (apps/nextjs/.next/server/chunks/[turbopack]_runtime.js:589:23) which causes TRPCClientError: Invalid response or stream interrupted
at TRPCClientError.from (http://localhost:3000/_next/static/chunks/08b5e_ef6448._.js:4868:16)
at http://localhost:3000/_next/static/chunks/08b5e_ef6448._.js:5755:215 Any idea how to solve this? My cookie auth is based on https://github.com/leerob/next-saas-starter |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to use supabase's authentication methods instead of NextAuth's for a variety of reasons, but mostly because I prefer how they handle authentication providers.
It's a bit of involved process going from NextAuth to Supabase auth, so for anyone wondering how to do this or looking to start a project using Supabase auth instead of NextAuth, this is for you.
Repo: https://github.com/jasonrobwebster/create-t3-turbo-supabase-auth
Demo: https://create-t3-turbo-supabase-auth.vercel.app/
*Note: Expo is not supported yet. I don't use this personally, but if you do feel free to go ahead and add a PR with any issues you are facing.
Beta Was this translation helpful? Give feedback.
All reactions