Git Product home page Git Product logo

Comments (6)

raclim avatar raclim commented on July 18, 2024

Thanks @TiborUdvari!

I think this issue might be related to some of the changes I made to the overall passport.js file 😅 I'm sorry about that! I think I might've not checked this portion as thoroughly since I didn't realize this feature was still being used by folks. I'll try to push out a fix for this alongside some other issues that were found within the next few days!

from p5.js-web-editor.

TiborUdvari avatar TiborUdvari commented on July 18, 2024

I saw it wasn't super well documented, so I was really happy to have it work! I think it's super useful to keep stuff updated. Especially for libraries that should have examples in the source, but should also be quickly testable I think.

from p5.js-web-editor.

raclim avatar raclim commented on July 18, 2024

I think this wasn't kept up to date for a bit because there was some discussion about whether to continue developing the API or not due to security concerns! I think due to this though I'm having some difficulty pinpointing what exactly the cause for this was. Would you be able to share your process with getting it to work?

from p5.js-web-editor.

TiborUdvari avatar TiborUdvari commented on July 18, 2024

Hi,

So I looked through the source code and the issues, and I saw that ml5 was using this, I thought that it was just something that was not well documented.

When looking through the code I saw the section relating to API keys, so I used tampermonkey to add the environment variable and I saw that the UI was there.

(function() {
    'use strict';
    window.process.env.UI_ACCESS_TOKEN_ENABLED = true;
})();

I think the button wasn't working to generate a new API key so I sent the request to generate the API key manually:

fetch('https://editor.p5js.org/editor/account/api-keys', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    label: 'test'
  })
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Then it showed up in the UI.

Afterwards I followed the documentation to make the API calls.

from p5.js-web-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.