vicalloy / outline-docker-compose

Install a self-hosted Outline wiki instance in a couple of minutes
BSD 3-Clause "New" or "Revised" License
770 stars 132 forks source link

State not return in OAuth flow #57

Open alvisisme opened 1 year ago

alvisisme commented 1 year ago

问题描述

原本正常的服务迁移到新服务器上后登录时提示:

Authentication failed – we were unable to sign you in at this time. Please try again.

停用新服务,原有服务重新启用也开始报同样的错误。 两个服务都是同样的方式部署,通过 nginx 将同一个域名指向不同的服务IP。

docker 日志显示

outline-wk-outline-1 | {"error":"State not return in OAuth flow","stack":"BadRequestError: State not return in OAuth flow\n at OAuthStateMismatchError (/opt/outline/build/server/errors.js:113:34)\n at StateStore.verify (/opt/outline/build/server/utils/passport.js:48:61)\n at OAuth2Strategy.authenticate (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:222:26)\n at attempt (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:369:16)\n at authenticate (/opt/outline/node_modules/passport/lib/middleware/authenticate.js:370:7)\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:194:7\n at new Promise ()\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:193:12\n at /opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:143:7\n at new Promise ()\n at passportAuthenticate (/opt/outline/node_modules/@outlinewiki/koa-passport/lib/framework/koa.js:107:15)\n at passportMiddleware (/opt/outline/build/server/middlewares/passport.js:71:7)\n at dispatch (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:346:16\n at dispatch (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)\n at methodOverrideMiddleware (/opt/outline/build/server/middlewares/methodOverride.js:22:12)\n at dispatch (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)\n at next (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)\n at /opt/outline/node_modules/koa-router/lib/router.js:346:16\n at dispatch (/opt/outline/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)","level":"error","message":"Error during authentication"}

版本描述

OUTLINE_VERSION=0.65.2 POSTGRES_VERSION=14.4-alpine3.16 REDIS_VERSION=7.0.5 NGINX_VERSION=1.22.1 MINIO_VERSION=RELEASE.2022-11-17T23-20-09Z MINIO_MC_VERSION=RELEASE.2022-11-17T21-20-39Z

andre0rlandi commented 1 year ago

Have you solved this issue?