jetbridge / axios-jwt

Store, transmit, refresh JWT authentication tokens for axios
https://www.npmjs.com/package/axios-jwt/
117 stars 30 forks source link

Support new versions of axios as well as switching from jsonwebtoken to jwt-decode #31

Closed moshfrid closed 2 years ago

moshfrid commented 2 years ago

Thanks so much for this fantastic tool! New versions of axios break with this library due to the new optional type of requestConfig.headers, so I've just added a check that it exists. Also, we're using jsonwebtoken for just the decode function and the tests which seems like a lot of overkill. This was my main motivation for this request as jwt-decode is much smaller and faster. @revmischa or @mvanroon if possible could you approve the workflow? Thanks

moshfrid commented 2 years ago

closes #30

revmischa commented 2 years ago

Thanks!

juanleiguarda commented 2 years ago

@moshfrid nice work! Linter seems to be failing, would you like to take a look at it?

moshfrid commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

juanleiguarda commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

Awesome looks like you could figure it out already.

moshfrid commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

Awesome looks like you could figure it out already.

nope. still cant push this because the formatting check wont pass :(

juanleiguarda commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

Awesome looks like you could figure it out already.

nope. still cant push this because the formatting check won't pass :(

Hey @moshfrid , you're right. Just checked in your repo and GHAs are not passing. Apparently, this is just due to a lack of formatting using Prettier:

image

I tried running prettier locally after a clean install and I got the file formatted but I couldn't push to your repo because of a lack of permissions.

Just in case, would you like to try to remove package-lock.js and do a clean install npm i? Otherwise, if you give me access I can try pushing to your repo and see if the same happens to me.

moshfrid commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

Awesome looks like you could figure it out already.

nope. still cant push this because the formatting check won't pass :(

Hey @moshfrid , you're right. Just checked in your repo and GHAs are not passing. Apparently, this is just due to a lack of formatting using Prettier:

image

I tried running prettier locally after a clean install and I got the file formatted but I couldn't push to your repo because of a lack of permissions.

Just in case, would you like to try to remove package-lock.js and do a clean install npm i? Otherwise, if you give me access I can try pushing to your repo and see if the same happens to me.

I tried with a clean install, still nothing, so weird. I just gave you access to the repo tho.

juanleiguarda commented 2 years ago

@juanleiguarda I'm not sure why, but locally I'm passing the prettier check and it keeps failing when pushed

Awesome looks like you could figure it out already.

nope. still cant push this because the formatting check won't pass :(

Hey @moshfrid , you're right. Just checked in your repo and GHAs are not passing. Apparently, this is just due to a lack of formatting using Prettier: image I tried running prettier locally after a clean install and I got the file formatted but I couldn't push to your repo because of a lack of permissions. Just in case, would you like to try to remove package-lock.js and do a clean install npm i? Otherwise, if you give me access I can try pushing to your repo and see if the same happens to me.

I tried with a clean install, still nothing, so weird. I just gave you access to the repo tho.

Yes, really weird. I just pushed and now it seems that tests are passing 👌

moshfrid commented 2 years ago

Awesome! Thanks so much! Can we merge and create a release?

revmischa commented 2 years ago

1.7.2 is published, thanks for the contribution!