Skip to content

Commit

Permalink
Merge pull request #29 from knowbee/ft-bitbucket
Browse files Browse the repository at this point in the history
chore(guid): added bitbucket documentation
  • Loading branch information
thepatrickniyo authored Apr 27, 2022
2 parents a8d2419 + 67d304e commit 52d2b1c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ GITHUB_API= https://api.github.com
GITHUB_PERSONAL_ACCESS_TOKEN=

BITBUCKET_API=https://bitbucket.org/!api/2.0
BITBUCKET_ACCESS_TOKEN=
BITBUCKET_CLIENT_ID=
BITBUCKET_SECRET=
BITBUCKET_AUTH_TOKEN=
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET

Use the [this documentation guid](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/guides/GITHUB-APP-README.md) to be able to create a github application and have the API credentials to use in the app

## Getting started with Bitbucket API

To access the bitbucket api. A bit bucket application credentials are required.
Follow the guid on [here]() to create bitbucket app and generate a bitbucket credentials

## Getting started

`git clone https://github.com/knowbee/stackoverflow-auth-microservice.git`
Expand Down
49 changes: 49 additions & 0 deletions docs/guides/BITBUCKET-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Getting started with Bitbucket app

Technical documentation on how to get started with bitbucket API

## Getting a bitbucket **Auth token**

To get the bitbucket **Auth token** you need to have [an Atlassian](https://atlassian.com) account. click [here](https://id.atlassian.com/login?continue=https%3A%2F%2Fdeveloper.atlassian.com%2F%2Fcloud%2Fbitbucket%2F) to login or create your account.


To get the **Auth Token** open [this link](https://id.atlassian.com/manage-profile/security/api-tokens).

On successfully creating the Auth token copy it and past it under `.env` on env variable **BITBUCKET_AUTH_TOKEN**


![bitbucket auth token](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/assets/bitbucke-auth-token.png?raw=true)



## Creating a bitbucket oAuth 2.0 App for authentication integration

To create a bitbucket oAuth 2.0 app just visit [this link](https://developer.atlassian.com/console/myapps/) to get started

Click the **Create** button to get started, from the drop down select **oAuth 2.0 integration**


### Create an app

To create an app :

1. [Add the app name and check the check box to agree to terms](https://developer.atlassian.com/console/myapps/create-3lo-app/)

2. Click create button to confirm

3. Click Create app password.

![demo app](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/assets/0auth2.0-app.png?raw=true)


Next you open the **App details** section and scroll down to copy the app **client ID** and **secret**

Past the two values to their corresponding environment variables under `.env`

```
BITBUCKET_CLIENT_ID=
BITBUCKET_SECRET=
```



0 comments on commit 52d2b1c

Please sign in to comment.