T3 Middleware
Hello there, I was wondering if it is possible to use middleware.ts using the t3 stack (NextJS, tRPC, Drizzle and AuthJS v4).
There are two session strategies, database sessions (t3 default) and JWT sessions.
I read a lot and saw some videos but still not sure if it is possible. Maybe with the AuthJS v5 something change or idk.
Does someone know about this?
I already read the t3 documentation about this this
2 Replies
Something important: I don't want to use JWT, the question is ¿Is it possible to use middleware.ts with the database strategy? thanks.
Hey @bastián . I tried using nextAuth v5 (beta) and the default database session strategy was not working for me.
I have to do it with the jwt sessions. When I am using using the default database session , it was throwing error.
Last thing, I am not using tRPC.