kahmali / meteor-restivus

REST APIs for the Best of Us! - A Meteor 0.9+ package for building REST APIs https://atmospherejs.com/nimble/restivus
MIT License
544 stars 116 forks source link

How can I override default login #256

Closed spk2piyu closed 7 years ago

spk2piyu commented 7 years ago

In my case I want to return user profile along with auth-token and user id in successful login. I am using restivus JS for rest api. curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'password=bff99efd&username=%2B919028000877' "http://localhost:3000/api/login"

spk2piyu commented 7 years ago

onLoggedIn: function () { console.log(this.user.username + ' (' + this.userId + ') logged in');

     return {profile : this.user.profile} ;
            },

I am able to handle using above code.