decaporg / decaporg/decap-cms

PKCE Support for Bitbucket

Open
#7,327 2 comments 1 reaction 0 assignees View on GitHub
area: extensions/backends/bitbucket type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**
Bitbucket Cloud currently does not support PKCE (see [this](https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-cloud-api-PKCE-Authorization-flow-Client-credentials/qaq-p/2373781)) so Decap is currently using [Implicit grant](https://github.com/decaporg/decap-cms/blob/51eb7e831e9b587faed62314c4397b2966a8eefe/packages/decap-cms-backend-bitbucket/src/AuthenticationPage.js#L28) instead.

Implicit auth has downsides, per [your documentation](https://decapcms.org/docs/bitbucket-backend/):

> Warning: With Bitbucket implicit grant, the authentication is valid for 1 hour only. After that, the user has to login again, which can lead to data loss if the expiration occurs while content is being edited.

There are other issues like users being locked out from login after tokens expire: https://github.com/decaporg/decap-cms/issues/4183

**Describe the solution you'd like**
There's a feature request for Atlassian's engineering team to add PKCE: https://jira.atlassian.com/browse/BCLOUD-23469

It would be great if interested parties added their support there by:
1. Logging in and clicking "vote for this issue" in the right sidebar
2. Leaving a comment explaining why PKCE would be useful to you

**Describe alternatives you've considered**
Use GitLab, Gitea, Forgejo, or other Git hosts that already support the PKCE workflow.

**Additional context**
PKCE is generally considered more secure than Implicit Auth for public clients that can't safely store a secret. Per the Postman article [Implicit Flow is Dead, Try PKCE Instead](https://blog.postman.com/pkce-oauth-how-to/):

> For native and browser-based JavaScript apps, it is now widely considered a best practice to use the Authorization Code flow with the PKCE extension, instead of the Implicit flow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.