Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Can not set server-side authentication headers #72

Open
monokrome opened this issue May 21, 2020 · 3 comments
Open

Can not set server-side authentication headers #72

monokrome opened this issue May 21, 2020 · 3 comments

Comments

@monokrome
Copy link

monokrome commented May 21, 2020

The following comment suggests that this is possible, but I've spent the better part of the last 3 hours trying every trick in the book and can't find any solutions. Is this supported? We can't monkey patch it since it's not exported, but that seems excessive anyway. What is the expected use-case that this comment refers to?

https://github.com/adamsoffer/next-apollo/blob/master/src/withApollo.js#L181-L182

Thanks a bunch =^.^=

@monokrome
Copy link
Author

Thoughts? @adamsoffer

@adamsoffer
Copy link
Owner

adamsoffer commented May 27, 2020

hm that's odd. Sorry for the trouble. I'm not sure why the headers wouldn't be getting set. I'll look into this. Out of curiosity, if you use the with-apollo example in the next.js repo do the headers get set? This lib essentially just packages up and creates an abstraction based on that example.

@shoaibsharif
Copy link

shoaibsharif commented Jul 14, 2020

I also had the same issue. I used with-apollo in the next.js repo and I have noticed the same issue too. On client-side it works perfectly. if you want a demo you can visit https://dev.techdiary.dev. if you login and then go to Menu>dashboard and refresh the page it pass the headers every time but. But if you go to / page (which is server side) the cookie doesn't pass, hence it shows me as not logged in any more. If you find any solution please le me know. FYI, cookie sets everytime I log in but if I refresh the page it doesn't send cookie anymore but on the client side, it sends cookie everytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants