Skip to content

signUp returns {"error":"unauthorized"} #79

Closed
@rickspencer3

Description

@rickspencer3

Hi. I'm new to Parse. I started with adding signUp functionality, but I got stuck, and I am hoping you can help me.

I am running parse locally via docker-compose.

These two work:

$ curl -X POST -H "X-Parse-Application-Id: 'app'" -H "Content-Type: application/json" --data '{"username":"eseex","password":"cccc","email":"[email protected]"}' http://127.0.0.1/parse/users

$ curl -X POST -H "X-Parse-Application-Id: 'app'" -H "Content-Type: application/json" --data '{"username":"eeex","password":"cccc","email":"[email protected]"}' http://127.0.0.1/parse/classes/_User

Here is my code:

          Parse().initialize("app", "http://10.0.2.2/parse", debug: true);

          ParseUser user = ParseUser("testUser",
              "asfasfasfd", "[email protected]");
          ParseResponse response = await user.signUp();

Note the different ip address due to running from the emulator. I always receive:

{"error":"unauthorized"}

from these requests. I have spent a few hours debugging, but I just can't figure out where the problem is.

I suspect that there is something fundamental about Parse or running from an emulator that I am not understanding. Any help would be appreciated.

Here is the Parse configuration:

parse_1            | appId: 'app'
parse_1            | masterKey: ***REDACTED***
parse_1            | serverURL: http://127.0.0.1:1337/parse
parse_1            | masterKeyIps: []
parse_1            | appName: parse-server
parse_1            | logsFolder: ./logs
parse_1            | databaseURI: mongodb://bn_parse:82kRGAHhdF@mongodb:27017/bitnami_parse
parse_1            | userSensitiveFields: ["email"]
parse_1            | enableAnonymousUsers: true
parse_1            | allowClientClassCreation: true
parse_1            | maxUploadSize: 20mb
parse_1            | customPages: {}
parse_1            | sessionLength: 31536000
parse_1            | expireInactiveSessions: true
parse_1            | revokeSessionOnPasswordReset: true
parse_1            | schemaCacheTTL: 5000
parse_1            | cacheTTL: 5000
parse_1            | cacheMaxSize: 10000
parse_1            | objectIdSize: 10
parse_1            | port: 1337
parse_1            | host: 0.0.0.0
parse_1            | mountPath: /parse
parse_1            | scheduledPush: false
parse_1            | collectionPrefix: 
parse_1            | preserveFileName: false
parse_1            | verifyUserEmails: false
parse_1            | preventLoginWithUnverifiedEmail: false
parse_1            | enableSingleSchemaCache: false
parse_1            | enableExpressErrorHandler: false
parse_1            | jsonLogs: false
parse_1            | verbose: false
parse_1            | level: undefined

Note that I have redirection port 80 to 1337.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions