Hello how do I do authentication without Next-Auth or any other auth library?

Hello, I would like implement a session based authentication in my t3 app but without Next-Auth or any auth library, this might be a dumb question but I really don't know where to start. I know how to do it using Express, or Fastify though but i don't how to do with this stack and tempalte, is it using Express behind the scenes so I need to use express-session or what. Thanks.
5 Replies
theBarracuda
theBarracuda3w ago
The Copenhagen Book
The Copenhagen Book
A basic guideline on implementing auth for the web.
DINO
DINOOP3w ago
Thank you very much for the resource. But my problem is how do I implement a simple auth in Next.js with tRPC. I just would have loved a simple kick start.
<DxD/>
<DxD/>3w ago
well, in trpc u have all normal routes for auth, login register etc etc, have a context there to check all ur routes if user is auth, on next, create a middleware where u do login/register first and also there u check on each page token from cookie, do this on ssr(use server) @DINO just use jwt, i kinda do not like nextauth or others, i prefer to use access/refresh token and that is i did this 6 month ago on my project (next js mongodb and trpc)
DINO
DINOOP3w ago
@<DxD/> Thank you very much ❤️
<DxD/>
<DxD/>3w ago
Any time Ask gpt a simple code
Want results from more Discord servers?
Add your server