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

compatibility issue of koa-passport with apollo-server-koa 2.0 #119

Closed
tanekim88 opened this issue Jul 26, 2018 · 0 comments
Closed

compatibility issue of koa-passport with apollo-server-koa 2.0 #119

tanekim88 opened this issue Jul 26, 2018 · 0 comments

Comments

@tanekim88
Copy link

tanekim88 commented Jul 26, 2018

I am using Koa-passport and Koa-session, along with Apollo-Server-Koa
Apollo-Server-Koa 1.* let's koa-session to set cookie without an issue.
In version 2.0, it no longer lets koa-session to sets cookie. I.e., in google chrome's inspecter pane-> Application -> Cookies are not filled up

how to reproduce:
I have 2 repositories:
https://github.com/tanekim77/apollo-server-koa-1.4-setting-cookies
https://github.com/tanekim77/apollo-server-koa-2-not-setting-cookies

How to test:

=> open the repo in vs code,
0. in the terminal=> yarn install

  1. press F5 to debug,
  2. open the chrome browser,
    and go to localhost:4000/graphql for
    https://github.com/tanekim77/apollo-server-koa-2-not-setting-cookies
    and go to localhost:3000/graphiql for
    https://github.com/tanekim77/apollo-server-koa-1.4-setting-cookies

=>Please note the extra "i" in localhost:3000/graphiql compared to localhost:4000/graphql

get into inspector pane in chrome by pressing F12 on windows, go to Application tab, and go to "Cookies" in the left pane, and inspect if cookies are filled up when making this query
{
hi
}

Then, you will see one repo filling up 2 cookies, while the other do not.
Since they are both localhost, even if one repo fills up cookies, the cookies will be shown to the other localhost address as well. So, please clear up cookies before sending each query.

@tanekim88 tanekim88 changed the title compatibility issue with apollo-server-koa 2.0 compatibility issue of koa-session with apollo-server-koa 2.0 Jul 26, 2018
@tanekim88 tanekim88 reopened this Jul 26, 2018
@tanekim88 tanekim88 changed the title compatibility issue of koa-session with apollo-server-koa 2.0 compatibility issue of koa-passport with apollo-server-koa 2.0 Jul 26, 2018
@tanekim88 tanekim88 changed the title compatibility issue of koa-passport with apollo-server-koa 2.0 compatibility issue of koa-session with apollo-server-koa 2.0 Jul 27, 2018
@tanekim88 tanekim88 changed the title compatibility issue of koa-session with apollo-server-koa 2.0 compatibility issue of koa-passport with apollo-server-koa 2.0 Jul 27, 2018
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

1 participant