# BitBucket OAuth Consumer

# Create a new OAuth Consumer

  • Go to Bitbucket settings - OAuth
  • Click Add consumer

Set up OAuth App - Bitbucket 01
Set up OAuth App - Bitbucket 02
Set up OAuth App - Bitbucket 03

  • Set the Callback URL to your website URL (Here we take localhost:8080 for example)
  • Unselect This is a private consumer
  • Select Account - Read and Issues - Write permissions

Set up OAuth App - Bitbucket 04
Set up OAuth App - Bitbucket 05

# Get the Client ID

Then you've created a new OAuth Consumer, and here is your Key (Client ID).

Set up OAuth App - Bitbucket 06

# Config and start your Vssue

Copy the Client ID, and set owner and repo.

The URL pattern of bitbucket repo is https://bitbucket.org/${owner}/${repo}

Here we take https://bitbucket.org/meteorlxy/vssue-demo for example, and set the title of issue to Vssue Demo.

Then run anywhere -h localhost 8080 to serve the index.html on localhost:8080.

Set up OAuth App - Bitbucket 07

# Try out Vssue locally

Vssue has already run here. Click Login to login with Bitbucket account.

Set up OAuth App - Bitbucket 08

Redirect to Bitbucket Authorization page. Click Grant access to login.

Set up OAuth App - Bitbucket 09
Set up OAuth App - Bitbucket 10

Oops, failed to load comments. Your repo should enable the Issue Tracker to make Vssue works.

Set up OAuth App - Bitbucket 11

Leave a comment on this page ~

Set up OAuth App - Bitbucket 12
Set up OAuth App - Bitbucket 13

TIP

You can go to the repo meteorlxy/vssue-demo to get the demo code. Check the #1 issue of that repo to see what happened.