Cloudinary media library: can't log in using signature and timestamp
See original GitHub issueHello, I’m trying to initialize the CMS manually and pass the Cloudinary signature and timestamp during run time using the Netlify function with the below settings but those parameters are not getting passed. If I pass the complete config with load_config_file:false I’m able to auto sign in to the Cloudinary widget. I referenced these docs https://www.netlifycms.org/docs/beta-features/#manual-initialization and issue https://github.com/netlify/netlify-cms/issues/1999
Source Code PR: https://github.com/hpe-dev-incubator/hpe-dev-portal/pull/275
To Reproduce Follow the instructions from this comment https://github.com/netlify/netlify-cms/issues/1999#issuecomment-462473073
Expected behavior Should be able to auto-login into Cloudinary media library.
Screenshots
Applicable Versions:
- Netlify CMS version: [e.g. 2.0.4]
- “netlify-cms-app”: “^2.14.25”,
- “netlify-cms-media-library-cloudinary”: “^1.3.10”,
- OS: macOS Catalina V.10.15.7
- Browser version: Chrome Version 90.0.4430.212
- Node.JS version: v14.16.0
CMS configuration
backend:
name: github
repo: hpe-dev-incubator/hpe-dev-portal
branch: master
open_authoring: true
publish_mode: editorial_workflow
site_url: https://developer.hpe.com
display_url: https://developer.hpe.com
logo_url: /img/dev-thumb2.png
media_folder: static/img
public_folder: /img
media_library:
name: cloudinary
config:
cloud_name: 'hpe-dev-portal'
api_key: 'xxxxx'
username: 'xxxxxx'
output_filename_only: true
collections:
- label: 'Home'
name: 'home'
format: 'frontmatter'
publish: false
editor:
preview: true
CMS Configuration
window.CMS_MANUAL_INIT = true;
import CMS, { init } from 'netlify-cms';
import cloudinary from 'netlify-cms-media-library-cloudinary';
const userAction = async () => {
try {
const url = '/.netlify/functions/cloudinary';
const response = await fetch(url);
const resp = await response.json();
init({
config: {
media_library: {
config: {
signature: resp.signature,
timestamp: resp.timestamp,
},
},
},
});
CMS.registerMediaLibrary(cloudinary);
} catch (err) {
console.log('error', err);
}
};
userAction();
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Hello, again @erezrokah I’m going to drop off from this issue for now, in case someone else is interested they can give it a go. If there’s a future response about how to reproduce the bug I’m open to try it again. 😃
That would be great @alexgerdisch, see also https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md