Description
I'm currently working with two clients: JavaScript and an iOS app.
The JavaScript client will only connect if I don't have a client key defined upon setup:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: 'myAppId',
// clientKey: 'clientKey',
masterKey: process.env.MASTER_KEY || 'myMasterKey'
});
The initialization and query of Parse in my Javascript is:
Parse.initialize('myAppId');
Parse.serverURL = 'http://localhost:1337/parse';
var Purchased_Tickets = Parse.Object.extend("GameScore");
var query = new Parse.Query(Purchased_Tickets);
query.find({
success: function(games) {
for (var i = 0; i < games.length; ++i) {
console.log(games[i].get('score'));
}
console.log("THE COUNT = ");
console.log(games.length);
res.send(games.length);
}
});
If I include the client key in the initialization of the parse server and my query -- I get a 403 (authorization error).
The iOS SDK requires the clientKey upon initialization or else it will not build. Because of this, I'm not able to connect both of my clients to the same ParseServer. Any suggestions?
Metadata
Metadata
Assignees
Labels
No labels