[{"data":1,"prerenderedAt":159},["ShallowReactive",2],{"project-40408876":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":34,"aspects":35,"strip":37,"post_text":38,"what":39,"said":66,"maker_in_thread":98,"shape":106,"grid":109,"attempts":120,"same_week":121,"maker_shows":151,"maker_hidden":152,"reader_version":153,"card":154},"40408876","Checkpoint 401","forward auth server in TypeScript \u002F Deno","title","Show HN: Checkpoint 401 – forward auth server in TypeScript \u002F Deno","https:\u002F\u002Fgithub.com\u002Fcrowdwave\u002Fcheckpoint401","github.com","andrewstuart",1716144086,2024,9,5,2855,3515,82,"shown","infrastructure","forward auth server","library",[24,25,26,27,28],"forward auth","deno","typescript","urlpattern","auth server","quiet",null,{"positive":32,"neutral":33,"mixed":33,"critical":32},1,0,2,{"design":36},{"positive":32,"critical":32},[33,15,33,32,33],"I wrote a forward auth server in TypeScript and Deno.\n\nI've written several forward auth servers before but they have always been specifically written for that application. I wanted something more generalised that I could re-use.\n\nWhat is forward auth?  Web servers likes Nginx and Caddy and Traefik have a configuration option in which inbound requests are sent to another server before they are allowed.  A 200 response from that server means the request is authorised, anything else results in the web server rejecting the request.\n\nThis is a good thing because it means you can put all your auth ",{"problem":40,"audience":46,"pricing":30,"motivation":50,"time_to_build":30,"stack":54,"openness":63,"stage":64,"team_size":65},{"value":41,"source":42,"evidence":43},"Web servers need a reusable place to delegate request authorisation","maker",[44],{"id":45},"post",{"value":47,"source":42,"evidence":48},"Skilled TypeScript developers",[49],{"id":45},{"value":51,"source":42,"evidence":52},"Wanted a generalised forward auth server reusable across applications instead of one-off versions",[53],{"id":45},[55,59],{"value":56,"source":42,"evidence":57},"TypeScript",[58],{"id":45},{"value":60,"source":42,"evidence":61},"Deno",[62],{"id":45},"open_source","prototype","unknown",{"praise":67,"objections":76,"requests":83,"questions":90,"alternatives":97},[68],{"value":69,"source":70,"evidence":71},"Error details in responses are good","commenter",[72],{"id":73,"by":74,"text":75},"40409898","paulddraper","Error details are good.",[77],{"value":78,"source":70,"evidence":79},"Pass\u002Ffail response gives no reason for failure, which makes auth hard to diagnose",[80],{"id":81,"by":74,"text":82},"40410387","Instead of just a pass\u002Ffail, it's often helpful to describe why it failed. Especially with something as difficult to diagnose as auth. Missing auth, malformed auth, invalid…",[84],{"value":85,"source":42,"evidence":86},"Return a reason value describing why auth failed",[87],{"id":88,"by":11,"text":89},"40410423","Agreed. I'll add a response value.",[91],{"value":92,"source":42,"evidence":93},"What does the error details comment mean",[94],{"id":95,"by":11,"text":96},"40410106","What do you mean?",[],{"comments":99,"answered":33,"key":100},3,[101,104,105],{"id":102,"text":103},"40409371","Here is the link to the source code: https:\u002F\u002Fraw.githubusercontent.com\u002Fcrowdwave\u002Fcheckpoint401\u002Fmaster\u002Fcheckpoint401.ts And the github repo:…",{"id":95,"text":96},{"id":88,"text":89},{"commenters":34,"max_depth":107,"maker_replies":99,"first_comment_mins":108,"lifespan_hours":107},4,78,[110,112,114,116,118],[102,33,33,111,11,32],"maker\u002Fneutral\u002Fdocs",[73,32,15,113,74,33],"project\u002Fpositive\u002Fdesign",[95,32,33,115,11,32],"maker\u002Fneutral\u002Fnone",[81,32,32,117,74,33],"project\u002Fcritical\u002Fdesign",[88,32,33,119,11,32],"maker\u002Fpositive\u002Fexecution",[],[122,127,132,137,142,147],{"id":123,"name":124,"points":125,"category":126},"40431126","Pls Fix",444,"web_saas",{"id":128,"name":129,"points":130,"category":131},"40429200","graphgame.sabrina.dev",321,"games",{"id":133,"name":134,"points":135,"category":136},"40441945","Unify",298,"ai",{"id":138,"name":139,"points":140,"category":141},"40392548","EquityVal",287,"finance_crypto",{"id":143,"name":144,"points":145,"category":146},"40443927","Neosync",246,"data",{"id":148,"name":149,"points":150,"category":146},"40432213","Openpanel",244,15,false,"v2",{"id":155,"name":5,"line":6,"ai":152,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":156,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":157,"url":9,"mix":158,"praise":69,"objection":78,"sub":21},40408876,[24,25,26,27,28],"05010",[32,33,33,32],1794036655049]