Mr T
Mr T

Reputation: 1000

Parse Server User Authentication

I've transferred my parse.com app onto a Heroku App with MongoDB - https://github.com/ParsePlatform/parse-server-example (Heroku seems to be the most popular way of migrating away from the discontinuing service).

I can communicate with the REST API & write using the application key set in the Heroku setup. I now want to lock down API access, so that only logged-in users can call the API (set up as database stored users - not oAuth via Twitter, Facebook, etc).

This would have been done by the following in Parse.com (in app) App Settings > Users > Allow anonymous users

Upvotes: 0

Views: 3334

Answers (1)

Mr T
Mr T

Reputation: 1000

Having installed Parse Dashboard, this has informed me how security is set (in the MongoDB). In the _Schema table you can set it in the relevant column. IE below, only User can write to the table, whereas everyone can get & find data & no-one can add fields:

{
    "_id": "test",
    "ACL": "object",
    "title": "string",
    "productIdentifier": "string",
    "_metadata": {
        "class_permissions": {
            "get": {
                "*": true
            },
            "find": {
                "*": true
            },
            "create": {
                "User": true
            },
            "update": {
                "User": true
            },
            "delete": {
                "User": true
            },
            "addField": {}
        }
    }
}

Upvotes: 0

Related Questions