繁体   English   中英

Keycloak 覆盖由 flask oidc 提供的重定向 uri

[英]Keycloak overrides redirect uri supplied by flask oidc

I'm running keycloak and nginx on non-general ports, so like nginx is running on 2933 and keycloak on 7118. All of my flask app and everything goes through nginx, but when the keycloak login is a success it loses the 2933 port in重定向并将我发送到 443。

如何让 keycloak 将我重定向到 2933 或我想要的任何端口?

The returning url after login is given by your app (flak) as a parameter to the login url in keycloak (and keycloak will check that this returning url is in the allowed url for that client, check the client config to ensure this port is added在允许的 url 列表中)。

检查此 url 是否正确。 必须由 flask 正确生成,带有端口。 Usually it means your flask has bad knowledge of urls used by the user when connecting to the flask application (for example you use a nginx proxy and redirect to flask using just the docker host name of the flask container).

检查您的 nginx 代理是否具有正确的配置,并且 flask 是否知道存在代理 目标是确保 flask 可以生成正确的完整 url 可以返回,因此在 flask 中对其进行调试。

如果这个返回的 url 可以在登录 forms 页面的查询字符串 arguments 中看到是有效的,那么这是另一个问题......让我们先检查一下。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM