Code Monkey home page Code Monkey logo

Comments (7)

DaniGuardiola avatar DaniGuardiola commented on June 9, 2024 2

@kr1sp1n we should consider adding the followAllRedirects: true request option by default, if it makes sense. I didn't do any research in this specific issue, but from my (somewhat limited) knowledge of the vault API, I think it wouldn't hurt to add this.

from node-vault.

owenfarrell avatar owenfarrell commented on June 9, 2024

@edasque - I ran across a similar issue. The way I solved the 3xx response was to pass the request options as a field. For example:

vault.githubLogin({
    githubToken,
    requestOptions: {
        followAllRedirects: true
    }
});

from node-vault.

rkdgusrnrlrl avatar rkdgusrnrlrl commented on June 9, 2024

i have same issue

i think that is not just redirect
cuz i think node-vault is basically caller API of Vault and almost API need value of X-Vault-Token in header but this value set only time call vault.auths()

i think it is easy way that fix in handleVaultResponse function
check login url and if this request is login, set client.token
i will write example under

//that is regular expression to check url of login
if (/\/auth\/[^\/]+\/login/.test(response.request.uri.path)) {
  client.token = response.body.auth.client_token;
}

but i dont sure that is right way 😕

from node-vault.

liambowers avatar liambowers commented on June 9, 2024

I was struggling with this problem with relating to approleLogin().

I was catching a 'Status 307' error and I'm really glad I found this page.

I completely agree that this should be set by default.

from node-vault.

DaniGuardiola avatar DaniGuardiola commented on June 9, 2024

Noted for v1.0

from node-vault.

kr1sp1n avatar kr1sp1n commented on June 9, 2024

@edasque @liambowers I think PR #93 may solve your problems. It is included since v0.9.3. Please check it out and give feedback. Thanks 🙏

from node-vault.

aviadhahami avatar aviadhahami commented on June 9, 2024

Stale issue, closing

from node-vault.

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.