Since the beginning of hellosails.com, there have been articles on the following topics: The basic structure of a Sails.js application Blueprints Policies Validations and Validation Messages Services The above should provide enough knowledge to understand how to build something (relatively small) with a real use case. So today, we're gonna build simple authentication for our Sails API from scratch. There are other tools one can use to (greatly) ease the process of implementing...

Sails.js Policies are pretty simple tools for controlling “who can do what” in your application. They let you allow or deny access to your controllers (and their actions) with nuance. Policies can be used to check if a request isAuthenticated before letting it through or if a User canEdit before updating another post. In fact, you can use (two) Policies to check if a request isAuthenticated AND if the User canEdit. They’re meant...