cofacts / rumors-api

GraphQL API server for clients like rumors-site and rumors-line-bot
https://api.cofacts.tw
MIT License
111 stars 26 forks source link

api.rumors.hacktabl.org 無法登入 #30

Closed MrOrz closed 7 years ago

MrOrz commented 7 years ago

http://api.rumors.hacktabl.org/login/facebook?redirect=/

Redirect 回來之後會變成

`appId` and `redirect` must be set before. Did you forget to go to /login/*?

上述訊息出自 https://github.com/MrOrz/rumors-api/blob/master/src/auth.js#L168

console.log 出來發現是 ctx.session === {},但理論上 session 應該已經在 https://github.com/MrOrz/rumors-api/blob/master/src/auth.js#L141 這附近設定了。

MrOrz commented 7 years ago

熊熊發現 koa-session2 用的是 in-memory Map(),我還以為是 cookie session⋯⋯

https://github.com/Secbone/koa-session2/blob/master/libs/store.js

實作 cookie store 中。

MrOrz commented 7 years ago

已經修復。