Giter Site home page Giter Site logo

Comments (8)

farshed avatar farshed commented on May 27, 2024

Hey, I just pushed a patch that should resolve these errors. Do let me know if it doesn't work.

from genius-lyrics-api.

maejml avatar maejml commented on May 27, 2024

Thank you for the quick reply. It now works on the browser with disabled security but still not on a normal browser...

from genius-lyrics-api.

farshed avatar farshed commented on May 27, 2024

cannot load XXXXX due to access control checks is actually a CORS error. It's probably being caused by your production or testing environment. Can you share some details about where are you hosting the app, which browser are you testing on and maybe a code snippet where you call the API?

from genius-lyrics-api.

mizanxali avatar mizanxali commented on May 27, 2024

I tried deploying my app on Github Pages as well as Heroku. Same error in both. Is this going to be fixed anytime soon or do I have to find another lyrics scraper?

from genius-lyrics-api.

iae1 avatar iae1 commented on May 27, 2024

I have the same error for me as well.

from genius-lyrics-api.

namirsab avatar namirsab commented on May 27, 2024

Hey everyone, it seems the problem is using the Authorization header. If you use the access_token in the query string, then there are not CORS issues. This seems to be on genius side.

One suggestion would be to expose a configuration flag that allows to configure the way authorization is done, e.g:

const options = {
	apiKey: 'XXXXXXXXXXXXXXXXXXXXXXX',
	title: 'Blinding Lights',
	artist: 'The Weeknd',
	optimizeQuery: true,
        authMethod: "header" // or "queryString"
};

from genius-lyrics-api.

Kalud-Z avatar Kalud-Z commented on May 27, 2024

@namirsab Does that mean , for the time being ,we can't really use this package in production mode ?

from genius-lyrics-api.

farshed avatar farshed commented on May 27, 2024

An authHeader [boolean] property can now be passed in the options object. Authentication via query string is the default. This should fix the CORS issue. Sorry this took so long.

from genius-lyrics-api.

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.