tRPCttRPC
Powered by
pjnicolasP
tRPC•3y ago•
9 replies
pjnicolas

How would you implement basic auth session tokens with tRPC?

I'm building a hobby app which requires basic auth. I'm used to use express and express-session along a SQL database (for the user data) and Redis (for the session data) to achieve that very easily, but I'm interested in learning tRPC.

My app is built in Next.js as a monorepo, and I would like to NOT implement JWT for authentication, just plain old session tokens. I'm thinking in implementing my own version on express-session for tRPC, but that sounds dangerous as I'm not that familiar with the technology or with backend code in general.

What would you suggest to keep it simple? I don't want to rely on external services like auth0 or firebase, but keep everything in my own server. This is a hobby app and it's not going to have a lot of active users.

Thanks!
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to implement tRPC auth ?
<DxD/><<DxD/> / ❓-help
3y ago
trpc auth
<DxD/><<DxD/> / ❓-help
3y ago
Not able to implement websockets with trpc
acronieAacronie / ❓-help
3y ago
Next-auth session not being fetched in tRPC context
MinhazMMinhaz / ❓-help
3y ago