We have a repository in Bitbucket Cloud that we use for storing the content as generated by NetlifyCMS@2. We have set up oAuth for the production using the auth_type='implicit in production. Meanwhile in development we access the CMS from http://localhost:3001/admin and the auth_type = undefined. This results in a call to API Netlify with https://api.netlify.com/auth?provider=bitbucket&site_id=cms.netlify.com&scope=repo which let's our developers to authenticate and enter in CMS.
Problem
One of the changes introduced in DecapCMS@3 is the change of the default site_domain used during the authentication. The site_domain (and consecutively the siteId) passed in the oAuth has changes from cms.netlify.com to demo.decapcms.org, this results in Not found response from https://api.netlify.com/auth?provider=bitbucket&site_id=demo.decapcms.org&scope=repo. As the demo.decapcms.org value is hardcoded for localhost, I can't override it.
If I search and replace all occurrences of demo.decapcms.org with cms.netlify.com, I am able to obtain the correct oAuth token and access into the CMS in localhost.
What am I supposed to do to enable access to CMS from localhost?
Describe the bug
Current setup
We have a repository in Bitbucket Cloud that we use for storing the content as generated by NetlifyCMS@2. We have set up oAuth for the production using the
auth_type='implicit
in production. Meanwhile in development we access the CMS fromhttp://localhost:3001/admin
and theauth_type = undefined
. This results in a call to API Netlify with https://api.netlify.com/auth?provider=bitbucket&site_id=cms.netlify.com&scope=repo which let's our developers to authenticate and enter in CMS.Problem
One of the changes introduced in DecapCMS@3 is the change of the default site_domain used during the authentication. The site_domain (and consecutively the
siteId
) passed in the oAuth has changes fromcms.netlify.com
todemo.decapcms.org
, this results inNot found
response from https://api.netlify.com/auth?provider=bitbucket&site_id=demo.decapcms.org&scope=repo. As thedemo.decapcms.org
value is hardcoded forlocalhost
, I can't override it.If I search and replace all occurrences of
demo.decapcms.org
withcms.netlify.com
, I am able to obtain the correct oAuth token and access into the CMS inlocalhost
.What am I supposed to do to enable access to CMS from
localhost
?To Reproduce
"netlify-cms-app": "^2.15.72" => "decap-cms-app": "^3.1.10"
"netlify-cms-core": "^2.55.2" => "decap-cms": "^3.1.10"
Expected behavior
I expect to be able to authenticate and enter CMS from the local development environment running on
http://localhost:3001/admin
.Screenshots![demo.decapcms.org – failed login access](https://github.com/decaporg/decap-cms/assets/1313681/2231f0e5-92c0-46d3-8fef-964965d87bf2)
Applicable Versions:
CMS configuration
Dynamic configuration