Giter VIP home page Giter VIP logo

axios-oauth-1.0a's People

Contributors

detachhead avatar dev-goformative avatar dobesv avatar kfredin-autopay avatar renovate-bot avatar renovate[bot] avatar rgigger avatar rodrigowbazevedo avatar shaynlink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

axios-oauth-1.0a's Issues

doesn't work when `params` is a `URLSearchParams` object and `url` has no query params in it

const url = new URL('https://example.com/?foo=bar')
const client = axios.create({url: 'https://example.com', params: url.searchParams})
addOAuthInterceptor(client, {
    algorithm: 'HMAC-SHA256',
    key,
    secret,
})

i think the issue is here, because oauthUrl.search and oauthUrl.searchParams are both empty when they shouldn't be
https://github.com/dobesv/axios-oauth-1.0a/blob/master/src/index.ts#L117-L122

see axios documentation, params can be a URLSearchParams object

Cannot remove interceptor on axios

We can not remove interceptor like this example:

const myInterceptor = axios.interceptors.request.use(function () {/*...*/});
axios.interceptors.request.eject(myInterceptor);

Because addOAuthInterceptor don't return interceptor.

Remove interceptor is useful if we using multiple auth method, like twitter that use Oauth1a, Oauth2 PKCE, Oath2 Bearer only, and other.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update Yarn to v3.8.3
  • Update Yarn to v4
  • Update dependency @types/node to v20
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • oauth-sign ^0.9.0
  • @babel/core 7.18.6
  • @babel/preset-env 7.18.6
  • @babel/preset-typescript 7.18.6
  • @types/auth-header 1.0.2
  • @types/jest 28.1.5
  • @types/node 16.18.44
  • auth-header 1.0.0
  • axios 0.27.2
  • axios-mock-adapter 1.21.1
  • jest 28.1.3
  • prettier 2.7.1
  • typescript 4.7.3
  • axios >=0.21.0
  • yarn 3.6.3
travis
.travis.yml
  • node 14

  • Check this box to trigger a request for Renovate to run again on this repository

Can't use import and require don't work

Hello,
I can't use import method (Cannot use import statement outside a module)
And when I user the require method : "addOAuthInterceptor is not a function"
What can I do ?
Thanks

axios-oauth-1.0a not working with webpack v5

When creating a react app using npx create-react-app now it comes with webpack v5, it seams that this package does not support it, when i try using it throws this error:

ERROR in ./node_modules/axios-oauth-1.0a/dist/index.js 25:31-48

Module not found: Error: Can't resolve 'crypto' in '/Users/jsuazo/Code/test/my_ap/node_modules/axios-oauth-1.0a/dist'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }

addOAuthInterceptor is not a function

There were some issues with installing dependencies, but once removed all axios versions up the dependency tree it did install but not cleanly 2 high severity warnings. Will they be addressed at some stage for easy/ secure automated installs? Thanks

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.