I've come across some paid services (e.g., stormpath, auth0) that seem to do what I'm talking about. It would be really nice if there were a free project along those lines though.
1. http://microservices.io/patterns/apigateway.html 2. https://getkong.org/ (a few auth plugins) 3. https://github.com/auth0/nginx-jwt / https://www.stavros.io/posts/writing-an-nginx-authentication...
Website blurb:
Add authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.
You'll even get advanced features such as User Federation, Identity Brokering and Social Login.
There's a deprecated `conn/0` function that you'll accidentally call instead if you forget to do this.
1. Security. Small non-obvious mistakes are easy to make and very important.
2. High visibility. Risky, and if it goes wrong it's a major thing your customers notice.
3. Dry. It's just not particularly interesting for me, it's certainly solved in other frameworks (e.g. devise). I'm aware this last point is extremely selfish of me, however.