SOLUTION!
Here is the solution to the problem in this original post
CORS in Apollo Client & A...
For further actions, you may consider blocking this person and/or reporting abuse
Hi!
Thecredentials: true
should be on the client-side, not on server-side.Edit: it should be included on both front-end (
credentials: 'include'
) and back-end (credentials: true
) - apollographql.com/docs/react/recip...I have the same problem ? Did you solved it ?
I did! Basically, it all came down to needing to pass in various options that were CORS related to both my frontend and backend. My main issue was that I was using apollo-server-express with cors middleware, but didn;'t realize that apollo-server-express had some cors built in and both were conflicting. I ended up doing:
Then my cors middleware worked and the tokens/headers were all getting passed correctly.
You can see my codebase here
ryanmdoyle / thermoFisherSci
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
ThermoFisher Scientific Part Descriptions
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
You can start the application by:
.
Thank you Ryan :)