Skip to content

Instantly share code, notes, and snippets.

@kv109
Last active April 23, 2018 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kv109/e5f81c0ba7724250de4f0a218190e3e0 to your computer and use it in GitHub Desktop.
Save kv109/e5f81c0ba7724250de4f0a218190e3e0 to your computer and use it in GitHub Desktop.
new mp-kit auth scenario

Marketplace KIT authorization flow is gonna change very soon.

Please help with testing the new flow!

(Yes, QA guys, I'm hoping that you'll help ;))

  • Uninstall your mp-kit:
npm uninstall -g @platform-os/marketplace-kit

Verify that you don't have marketplace-kit:

$ marketplace-kit
-bash: /usr/local/bin/marketplace-kit: No such file or directory
  • Install the new mp-kit version
npm install -g git://github.com:mdyd-dev/marketplace-kit.git#PP-27-replace-temporary-token-with-api-token
  • Go to directory with marketplace of your choice, let's say ATB:
cd marketplace-atb
  • Add some env. Important! You have to use your PARTNER PORTAL credentials, not your instance admin credentials!
marketplace-kit env add \
  --url https://your-instance.staging-california.near-me.com \
  --email your-partner-portal@email.com \
  new-auth-test
$ marketplace-kit deploy new-auth-test
[12:01:48] Archive size: 18.99 MB
[12:01:48] Deploying to: https://test-instance-20043.staging-california.near-me.com/
..........[12:02:55]
DONE
  • If you have any other kind of permission to PlatformOS or no permission at all, you should NOT be able to deploy:
$ marketplace-kit deploy new-auth-test
[11:58:14] Archive size: 18.99 MB
[11:58:14] Deploying to: https://test-instance-20043.staging-california.near-me.com/
[11:58:39] Error
[11:58:39] HTTP Status code: 401
[11:58:39] HTTP Token: Access denied.
  • Install the old marketplace-kit:
npm uninstall -g @platform-os/marketplace-kit
npm install -g git://github.com:mdyd-dev/marketplace-kit.git
  • Verify that the OLD flow works as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment