How do I migrate from Next-Auth to Clerk Auth?

I recently started a project with with all options enabled with create T3 stack command, how do I migrate to Clerk without messing up TRPC?
3 Replies
Circus
Circus11mo ago
This is a very good question that doesn't have a good answer (I just went down this rabbit hole recently). Here's the official thread on the Clerk discord https://discord.com/channels/856971667393609759/1176214255645773895 I don't know much about NextAuth, but I did get a simple version of Clerk working with TRPC on app router with public & protected routes, so if that's within the scope, I may be able to help out more
Mocha
Mocha11mo ago
I just migrated a project with >100 files. Theo's Chirp repo and tutorial helped. The hardest part is what comes after the setup. Like if you relied on Next Auth's user id, which will now have to be replaced with Clerk's.
GitHub
chirp/src/server/api/trpc.ts at main · t3dotgg/chirp
Contribute to t3dotgg/chirp development by creating an account on GitHub.
Theo - t3․gg
YouTube
T3 Stack Tutorial - FROM 0 TO PROD FOR $0 (Next.js, tRPC, TypeScrip...
I've never worked this hard on a video before. I really hope y'all can benefit from this 🙏 GITHUB REPO https://github.com/t3dotgg/chirp DEPLOYED APP https://xn--uo8h.t3.gg/ GET A JACKET IF YOU'RE COOL LIKE THAT https://shop.t3.gg/ ALL MY VIDEOS ARE POSTED EARLY ON PATREON https://www.patreon.com/t3dotgg Everything else (Twitch, Twitter, Discor...
Richard Biroš
Richard Biroš10mo ago
Do you have a minimum working example on Github? I recently tried to migrate from NextAuth to Clerk but it doesn't work on production environment.. When I authenticate with Clerk my app just crash and I can see in Vercel runtime logs this error c [TRPCClientError]: Unexpected non-whitespace character after JSON at position 4

Did you find this page helpful?