Skip to content
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

How do you use master key? #413

Closed
dylankbuckley opened this issue Feb 16, 2017 · 4 comments
Closed

How do you use master key? #413

dylankbuckley opened this issue Feb 16, 2017 · 4 comments

Comments

@dylankbuckley
Copy link

I want to use my master key, however none of the documentation even mentions it. How can I use it to call .save() and over-ride permissions on an object

@andrewimm
Copy link
Contributor

There's a bunch of information on the master key in the security section of the documentation: http://parseplatform.github.io/docs/js/guide/#client-vs-server

To summarize:

  • Only use it on the server; distributing the master key to your client means anyone can edit your data
  • To use it, it needs to be provided at initialization: Parse.initialize(applicationKey, optionalJSKey, masterKey);
  • To use it for all requests, call Parse.Cloud.useMasterKey()
  • To use it for a single request, provide useMasterKey: true in the optional permissions object passed as the final parameter to any server call, eg: myObject.save({}, {useMasterKey: true})

@jaimeagudo
Copy link

⚠️ Parse.Cloud.useMasterKey() is deprecated @dylankbuckley

@giusecapo
Copy link

@jaimeagudo What should I use instead?

@flovilmart
Copy link
Contributor

@giusecapo please see @andrewimm's response

josephfrazier added a commit to josephfrazier/reported-web that referenced this issue Jan 21, 2019
ACLs were introduced on the server-side without coordinating client-side
fixes, so just ignore them for now...

See https://reportedcab.slack.com/messages/C85007FUY/p1547991069001200?thread_ts=1547932006.001000&cid=C85007FUY
and parse-community/Parse-SDK-JS#413
josephfrazier added a commit to josephfrazier/reported-web that referenced this issue Jan 21, 2019
ACLs were introduced on the server-side without coordinating client-side
fixes, so just ignore them for now...

See https://reportedcab.slack.com/messages/C85007FUY/p1547991069001200?thread_ts=1547932006.001000&cid=C85007FUY
and parse-community/Parse-SDK-JS#413
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

6 participants
@flovilmart @andrewimm @jaimeagudo @dylankbuckley @giusecapo and others