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

Can't login via CURL #245

Closed alur222 closed 7 years ago

alur222 commented 7 years ago

Hi, please help I tried logging in to the api via curl. Already created a user using Accounts package and verified that i can login via browser (Meteor.loginWithpassword).

Request:

curl http://localhost:3000/api/v1/login -d "username=myuser&password=mypassword"

Response: { "status": "error", "message": "Unauthorized" }

Meteor version: 1.4.2

alur222 commented 7 years ago

CURL cant send passwords (strong) with special characters :( As an alternative, you can just use a hashed alphanumeric password.

kahmali commented 7 years ago

I think you just need to URL encode those special characters. cURL has a command for doing that actually.

alur222 commented 7 years ago

@kahmali thanks will try that!