Giter VIP home page Giter VIP logo

Comments (7)

vicalloy avatar vicalloy commented on September 17, 2024 1

@wujie1993 问题修正了。现在生成的SECRET会保存到config.sh,后续再执行 make start 的时候 OIDC_CLIENT_SECRET 不会变了。需要在config.sh里增加下面的设置

# Secret keys, update by script
# you shouldn't edit it
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
OIDC_CLIENT_SECRET=
OUTLINE_SECRET_KEY=
OUTLINE_UTILS_SECRET=
DJANGO_SECRET_KEY=

from outline-docker-compose.

vicalloy avatar vicalloy commented on September 17, 2024

你把你的 config.sh 贴出来看看。
另外你可以更新一下部署脚本到最新版本,可能可以解决该问题。
新脚本里对OIDC服务接口访问失败的问题做了一些优化。
另外 FORCE_HTTPS 不要修改,设置成 true 可能会有问题。

from outline-docker-compose.

wujie1993 avatar wujie1993 commented on September 17, 2024

Hi @vicalloy ,这是我部署后的登录报错

wk-outline_1        | {"error":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)","stack":"TokenError: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)\n    at OAuth2Strategy.parseErrorResponse (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:373:12)\n    at OAuth2Strategy._createOAuthError (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:420:16)\n    at /opt/outline/node_modules/passport-oauth2/lib/strategy.js:177:45\n    at /opt/outline/node_modules/oauth/lib/oauth2.js:191:18\n    at passBackControl (/opt/outline/node_modules/oauth/lib/oauth2.js:132:9)\n    at IncomingMessage.<anonymous> (/opt/outline/node_modules/oauth/lib/oauth2.js:157:7)\n    at IncomingMessage.emit (events.js:412:35)\n    at IncomingMessage.emit (domain.js:475:12)\n    at endReadableNT (internal/streams/readable.js:1334:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)","level":"error","message":"Error during authentication"}

scripts/config.sh配置

# The url used to vist this web site.
URL=http://10.13.4.209:8888
# The default interface language. See translate.getoutline.com for a list of
# available language codes and their rough percentage translated.
DEFAULT_LANGUAGE=en_US
# https://docs.djangoproject.com/en/2.2/ref/settings/#language-code
LANGUAGE_CODE=en-us
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIME_ZONE=UTC
FORCE_HTTPS=false

# Nginx
# The nginx bind ip and port.
# If you use ip address to access outline, this ip and port should be same as the URL.
# If this server behind a proxy(nginx), you can bind to `127.0.0.1` .
HTTP_IP=10.13.4.209
HTTP_PORT_IP=8888

# Docker
# If you server behind a proxy(nginx), and the proxy created by docker. You can use the proxy's network. Set the `NETWORKS` to proxy's network name, and set `NETWORKS_EXTERNAL` to `true` .
# The sample config for host nginx can be find in `config/sample/nginx_outline.conf`.
NETWORKS=outline
NETWORKS_EXTERNAL=false

from outline-docker-compose.

wujie1993 avatar wujie1993 commented on September 17, 2024

Hi @vicalloy ,这是我部署后的登录报错

wk-outline_1        | {"error":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)","stack":"TokenError: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)\n    at OAuth2Strategy.parseErrorResponse (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:373:12)\n    at OAuth2Strategy._createOAuthError (/opt/outline/node_modules/passport-oauth2/lib/strategy.js:420:16)\n    at /opt/outline/node_modules/passport-oauth2/lib/strategy.js:177:45\n    at /opt/outline/node_modules/oauth/lib/oauth2.js:191:18\n    at passBackControl (/opt/outline/node_modules/oauth/lib/oauth2.js:132:9)\n    at IncomingMessage.<anonymous> (/opt/outline/node_modules/oauth/lib/oauth2.js:157:7)\n    at IncomingMessage.emit (events.js:412:35)\n    at IncomingMessage.emit (domain.js:475:12)\n    at endReadableNT (internal/streams/readable.js:1334:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)","level":"error","message":"Error during authentication"}

scripts/config.sh配置

# The url used to vist this web site.
URL=http://10.13.4.209:8888
# The default interface language. See translate.getoutline.com for a list of
# available language codes and their rough percentage translated.
DEFAULT_LANGUAGE=en_US
# https://docs.djangoproject.com/en/2.2/ref/settings/#language-code
LANGUAGE_CODE=en-us
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIME_ZONE=UTC
FORCE_HTTPS=false

# Nginx
# The nginx bind ip and port.
# If you use ip address to access outline, this ip and port should be same as the URL.
# If this server behind a proxy(nginx), you can bind to `127.0.0.1` .
HTTP_IP=10.13.4.209
HTTP_PORT_IP=8888

# Docker
# If you server behind a proxy(nginx), and the proxy created by docker. You can use the proxy's network. Set the `NETWORKS` to proxy's network name, and set `NETWORKS_EXTERNAL` to `true` .
# The sample config for host nginx can be find in `config/sample/nginx_outline.conf`.
NETWORKS=outline
NETWORKS_EXTERNAL=false

我应该找到原因了,在执行 make start 命令后生成的 env.oidc 文件中 OIDC_CLIENT_SECRET 配置项的值与 OIDC 服务中的实际值不一致,修改后重启 outline 和 nginx 容器可以登录。

from outline-docker-compose.

vicalloy avatar vicalloy commented on September 17, 2024

@wujie1993 恩,这是个bug,每次start都会将配置文件生成一次,env文件里OIDC_CLIENT_SECRET变了,数据库里没有变。我想想怎么修改一下脚本。

from outline-docker-compose.

S4kur4 avatar S4kur4 commented on September 17, 2024

你把你的 config.sh 贴出来看看。 另外你可以更新一下部署脚本到最新版本,可能可以解决该问题。 新脚本里对OIDC服务接口访问失败的问题做了一些优化。 另外 FORCE_HTTPS 不要修改,设置成 true 可能会有问题。

使用了新的脚本部署认证成功了,Thanks!
另外想问一下,我在Outline点击退出登录,然后重新点击Continue with OpenID发现又登进去了,这里是不是应该在点击后使用账号密码重新登录呢?

screenshot.mp4

from outline-docker-compose.

vicalloy avatar vicalloy commented on September 17, 2024

@S4kur4 使用OIDC服务登录和你通过Github登录其他网站类似,要彻底退出还需要将ODIC服务器退出。使用 http://127.0.0.1:8888/uc/ 右上角的logout退出。

from outline-docker-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.