Skip to content

[Parse Server] clientKey is optional if using Parse Server #225

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

Closed
hramos opened this issue Feb 19, 2016 · 2 comments
Closed

[Parse Server] clientKey is optional if using Parse Server #225

hramos opened this issue Feb 19, 2016 · 2 comments

Comments

@hramos
Copy link
Contributor

hramos commented Feb 19, 2016

A client key (or REST API Key) does not need to be configured in order to deploy a Parse Server. The Parse PHP SDK does not currently support connecting to a clientKey-less Parse Server.

To resolve this, the ParseClient initialization method should be updated so that the $rest_key parameter is made optional.

We should also remove any exceptions that may be thrown if a client key is not provided.

@jakelisby
Copy link

jakelisby commented Dec 1, 2016

@hramos would this result in an "unauthorized" error when my Parse Server is deployed on AWS (not using a client key)? If so, is there any way in the immediate term to resolve that?

@montymxb
Copy link
Contributor

@jakelisby If no client keys are configured for the parse server you are connecting to you should be able to pass null or a string, it should be ignored upstream. The relevant section regarding client keys in parse server is here also for info on that.

There is a section in ParseClient::_getRequestHeaders that will still send the X-Parse-REST-API-Key header when the request does not indicate to use the master key. This header should be ignored, but ideally it should not be sent at all if the rest api key is null. I can put together a PR when I have a moment that makes the appropriate changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants