sukovanej / effect-http

Declarative HTTP API library for effect-ts
https://sukovanej.github.io/effect-http
MIT License
247 stars 20 forks source link

Create separate lib for Security ("Auth"?) module. #547

Closed jessekelly881 closed 2 months ago

jessekelly881 commented 5 months ago

The Security lib might work better as a separate (transport layer independent) library that works not only with with effect-http but also with pure @effect/platform http, rpc, and other transport layers. That's how I would like to use it anyway. :)

sukovanej commented 5 months ago

Yeah, I already thought about it. That holds for the middlewares like CORS in the codebase as well. Now that I see an outside interest in that, I might actually do it 😄.

sukovanej commented 4 months ago

Hey, done within the latest release. Readme, examples and probably some combinators enabling easy integration with a /platform are missing tho.

jessekelly881 commented 4 months ago

Looks fantastic! Thanks @sukovanej. Let me know if you need a hand with it. I'd be happy to help. :)

sukovanej commented 2 months ago

We discussed potential merge of this lib to the official effect monorepo. Independently of how that'll turn out, we talked with fubhy about the separation of packages and the result is we should rather aim for a simple setup with a single platform-independent package a few platform-specific ones. So I will very probably merge the effect-http-error and effect-http-security back. effect-http is practically dependency-free, there is @effect/platform, @effect/schema and effect as peer deps so it doesn't really make any difference.