Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Broken server side request with cookies in 5.12.2 #411

Closed
1ed opened this issue Aug 28, 2020 · 14 comments · Fixed by #452, elirehema/nbs-web#85 or elirehema/authx#9 · May be fixed by takawiramundure/admin-one-nuxt#1 or takawiramundure/viridi-website#1
Assignees

Comments

@1ed
Copy link
Contributor

1ed commented Aug 28, 2020

After upgrading from 5.12.1 to 5.12.2 a server side axios request seems like does not send the original request cookies. proxyHeaders is tuned on and it seems to work so I think it is a breaking change in axios itself. 5.12.1 used axios 0.19.2 but 5.12.2 uses axios 0.20.0 and it has a lot of changes axios/axios@v0.19.2...v0.20.0

@fsnlarson
Copy link

Broken in nuxt/auth as well nuxt-community/auth-module#809

@usb248
Copy link

usb248 commented Sep 7, 2020

+1

1 similar comment
@snsxn
Copy link

snsxn commented Sep 24, 2020

+1

@SebastianMieszczanczyk
Copy link

Is it connected with #428 ? Will it fix the issue?

@JerryKusenberger
Copy link

Was anyone able to find a workaround? I tried downgrading to 5.12.1... no luck. I made sure axios 0.19.2 was the only version installed.

@bmulholland
Copy link

@pi0
Copy link
Member

pi0 commented Dec 10, 2020

Hi. I made PR #452 for fix but still need a reproduction. Seems headers passing from client, are properly proxified to API inside asyncData. Would be nice if can help to make reproduction because otherwise cannot fix...

@msonowal
Copy link

msonowal commented Dec 11, 2020

@pi0
Hi I have made a repo to reproduce it correctly you can check it here just go through the readme
https://github.com/msonowal/nuxt-auth-411

Let me know if you need anything

@pi0
Copy link
Member

pi0 commented Dec 11, 2020

Thanks @msonowal that would be helpful i will try. Yet to fix issue in axios-module, we need bare minimum reproduction without depending on auth module. Taking above diff into account, must suspicious change in axios that broken auth, was axios/axios#1845 which if in auth module, we try to set cookie headers to null, original proxified ones will be discarded.

@1ed
Copy link
Contributor Author

1ed commented Dec 14, 2020

I have just added a minimal reproducer #452 (review)

@pi0 pi0 closed this as completed in #452 Dec 14, 2020
@pi0
Copy link
Member

pi0 commented Dec 14, 2020

Issue finally solved by v5.12.4. Special thanks again @1ed for making issue and helping for reproduction <3

@1ed
Copy link
Contributor Author

1ed commented Dec 14, 2020

Thanks for your great work!

@JerryKusenberger
Copy link

Thank you so much @pi0. I've already tested and pushed this change into production. Can confirm it has fixed a lot of strange issues we were having.

@dajpes
Copy link

dajpes commented Jan 17, 2021

Same here, after updating to the latest version (5.12.5), auth module issues from SSR are now fixed

# for free to join this conversation on GitHub. Already have an account? # to comment