News for hackers. Stuff that matters.
Re:Show HN: Front end-Only-Authorization – A new web standard by TekMol on Wednesday May 31, 2023 @11:14AM (#36139303)
IMHO the best way to do authorization if your application otherwise works completely in the frontend:

Rent a tiny VM for $5/month and set up a small "enter your email, you'll get a magic link" application you write in Python or PHP.

And proxy whatever API access you want to restrict to authorized users through a simple Python or PHP script which can just be a few lines of code. It looks up the cookie set by the magic link, checks if it is allowed to access the endpoint and if yes proxies the request.

Re:Show HN: Front end-Only-Authorization – A new web standard by orweis on Wednesday May 31, 2023 @11:16AM (#36139333)
That sounds more like Authentication (verify identity) than Authorization (decide specifically what they are allowed to do per request), no?
Re:Show HN: Front end-Only-Authorization – A new web standard by TekMol on Wednesday May 31, 2023 @11:18AM (#36139351)
Without identity, how would you decide if a user can access a resource or not?
Re:Show HN: Front end-Only-Authorization – A new web standard by orweis on Wednesday May 31, 2023 @11:22AM (#36139395)
Of course you need identity (FoAz uses JWTs from authN solutions - can also be your VM (if it produces a JWT as it's magic link process)) , but Authorization is another step on top.

e.g. You are [email protected] (or some other verified identity), I know you, but how many SMS messages should I allow you to send via Vonage or Twilio when you click the button in the app? Managing that quota is an example of authorization.

Re:Show HN: Front end-Only-Authorization – A new web standard by kolmel on Wednesday May 31, 2023 @11:23AM (#36139415)
That doesn't change the fact that they're separate but related concerns. Authentication is enforcing that someone is who they say they are, and authorisation is checking that that person is allowed to access a secure resource. Looks like FoAz just solves the authorisation problem, allowing you to use another authentication provider.