-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"error":"unauthorized" on debian 8.3.0 #477
Comments
Hi, Can you check that the index.js are the same into your two servers. I had the same problem, and it was because I did not put the serverURL into my index.js file (documentation was incomplete at that moment). So, it still tried to communicate with https://api.parse.com that returned this. This is how it should look with the serverURL option. ...
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
databaseURI: 'mongodb://localhost:27017/dev',
cloud: '/home/myApp/cloud/main.js', // Provide an absolute path
appId: 'myAppId',
masterKey: '', //Add your master key here. Keep it secret!
fileKey: 'optionalFileKey',
serverURL: 'http://localhost:' + port + '/parse' // Don't forget to change to https if needed
});
... |
Hi Kira2! The configuration is identical (windows and linux) |
@simonbengtsson i dont'use the https://api.parse.com/1 as default serverURL, please why? |
I mainly referenced because of @maurosoft1973 comment. One way to debug this is to systematically follow the request. I would first add a
Let me know your findings. |
@simonbengtsson i resolve problem, thanks! in the linux enviroment, the restAPIKey has a value. remove, works. this is my configuration var api = new ParseServer({ only appId ed masterKey is required ... |
I'm glad! Out of curiosity, how did the rest key only end up in debian? Environment variable? |
no enviroment variable, the paste rest Key accidentally in my configuration and I was convinced of the contrary! |
Hello!
I installed Node.js (version 5.6.0) and mongodb on a virtual machine.
To check if the environment works, I tried to enter from console:
curl -X POST -H 'X-Parse-Application-Id: AppId "-H" Content-Type: application / json "-d' {" score ": 1337," playername ":" Sammy "," cheatMode ": false} 'http://localhost:1337/parse/classes/gamescore where to AppId I replaced my AppId.
I always get the following error: {"error": "unauthorized"}
I created a virtual machine with Windows Server 2012, the same configuration for nodejs and mongo, testing the same script,it's works.
I do not understand why
The text was updated successfully, but these errors were encountered: