trailsjs / sails-auth

Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.
https://www.npmjs.org/package/sails-auth
MIT License
266 stars 141 forks source link

Register user - posting data return 403 ? #132

Closed Aure77 closed 8 years ago

Aure77 commented 8 years ago

I don't know if I am missing something but when I try to post user like this : curl -H "Content-Type: application/json" -X POST -d '{"username":"toto",email:"toto@go.lf","password":"qsdsqd"}' http://localhost:1337/register Same result with application/x-www-form-urlencoded (this should call UserController.create)

I always get : verbose: Sending 403 ("Forbidden") response: You are not permitted to perform this action.

Why ? Policies are same as sails-permissions example. How can I use correctly /register route for posting data ?

Aure77 commented 8 years ago

I finally succeeded to perform registration by adding this policy : UserController: { 'create': true }

Is this secure ?