kwhitley / itty-router-extras

An assortment of delicious extras for the calorie-light itty-router.
MIT License
84 stars 12 forks source link

Plans to handle basic auth? #28

Closed jsdevel closed 1 year ago

jsdevel commented 1 year ago

Would be mice to have some middleware to handle basic authentication. Or, is there already something that works nicely? was thinking about basic-auth from express, but not sure how it'll jive with TS.

kwhitley commented 1 year ago

I'll take a look, I'd say this is a wonderful opportunity for someone to make like a itty-router-basic-auth middleware or something.

Ideally, I wouldn't have all the stuff built in to itty, only the absolute basics (like request parsing and response handling). This means the maintenance of those various branches don't get bottlenecked by me (and believe me, I'm quite the bottleneck!) :)

jsdevel commented 1 year ago

@kwhitley i hear you on being bottlenecked! i love the idea of it living inside itty-router-extras though. given that it gets tree shaken, and it follows the pattern you already have here.

kwhitley commented 1 year ago

Well I just happen to be working on a global auth SaaS solution, so I'm knee deep in auth anyway... if I have any ideas, I may float it out there!

I'd suggest you hop onto Discord and throw out the suggestion as well. Sidenote, all the extras are pretty close to going in-house into itty core. Itty itself is sitting on a next release (full TS conversion), with extras to follow!

https://discord.gg/53vyrZAu9u