Theo's Typesafe CultTTC
Theo's Typesafe Cult17mo ago
3 replies
Balduin

NextJS REST API storing authed User per request

Hello i am looking for a good way to store the current User per request on the backend with NextJS endpoints.

I saw in terminals github the usage of node:asyncs_hooks wrapped by an Actor. I like that concept, but i think i dont need to have an AsyncLocalStorage.

Are the best practices to do that? could i just use a Map / an Object instead of the AsyncLocalStorage?
GitHub
Contribute to terminaldotshop/terminal development by creating an account on GitHub.
terminal/packages/core/src/context.ts at dev · terminaldotshop/term...
Was this page helpful?