muddmaker
muddmaker
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Unless it also specifies that they need to be REST or GraphQL or something like that
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
And use that to get them to talk to each other
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
If everything is going to be TypeScript, you could actually write your various microservices using tRPC+Express
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Oh, ok
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
And those can be written in Go
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
So an idea for the architecture could be that you still use Next.js+Tailwind+tRPC for the frontend and API service, and then oauth2-proxy for the auth, but then instead of then connecting that API service directly to a DB, you can then create an assortment of microservices behind that
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Did it give requirements for how many microservices need to be used?
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Ok
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Because microservices != scalability
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Did they specifically require you to use microservices, or did they just require you to make it "scalable"?
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
You might still be able to get away with using Next.js, TailwindCSS and even tRPC. Using a microservice architecture might also change the way you store your data, which could make Prisma unusable
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Just make sure you use some of the --pass-* configs so that your API knows who is calling it
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
Why would t3 be overkill? It's probably best suited for school projects and prototypes because of the fast iteration times it enables. A microservice architecture is what is probably overkill, but if it's mandatory...
30 replies
TTCTheo's Typesafe Cult
Created by hugolepot on 6/12/2023 in #questions
Use NextAuth as a microservice
The short answer is that the purpose of NextAuth is to run as part of your application, and not as a separate service. If you want to run authentication on a separate service, oauth2-proxy[1] is what you'll want to use. The T3 stack is not really designed around microservices. [1]: https://oauth2-proxy.github.io/oauth2-proxy/ May I ask why you wanted to use a microservice architecture?
30 replies