question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cloudinary media library: can't log in using signature and timestamp

See original GitHub issue

Hello, 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 image

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:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aileenpalafoxcommented, Jun 23, 2021

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. 😃

1reaction
erezrokahcommented, Jun 13, 2021

Hello, is okay if I give it a try?

That would be great @alexgerdisch, see also https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md

Read more comments on GitHub >

github_iconTop Results From Across the Web

Media Access Control and Authentication - Cloudinary
A signed Cloudinary delivery URL is a dynamic URL that has its signature validated before making it available for view (see the article...
Read more >
I got a "Stale request" error for my upload API call, what does it ...
All API requests are signed using your Cloudinary's API Key and Secret. For better security, the signature is valid for one hour.
Read more >
Generate Upload Signature (Video Tutorial) - Cloudinary
Watch a video tutorial to learn about generating a signature for signed uploads.
Read more >
Need to Open the widget without login - Cloudinary Support
Need to enable the end user open the medialibrary without login. ... Encrypted the below text using SHA 256 to generate signature
Read more >
Media Library Widget - Cloudinary Support
I have setup the Media Library Widget - and are able to upload images. But I need these images to be transformed using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found