flask - 一次登录 Apache Superset 集成
问题描述
我已经使用掌舵图将一次登录集成到超集。以下是通过一次登录进行身份验证的配置的一部分:
configOverrides:
enable_oauth: |
# This will make sure the redirect_uri is properly computed, even with SSL offloading
ENABLE_PROXY_FIX = True
from flask_appbuilder.security.manager import (AUTH_OAUTH, AUTH_DB)
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{ "name":"onelogin",
"token_key":"access_token",
"icon":"fa-address-card",
"remote_app": {
"client_id":"aaa-bbb-ccc-ddd",
"client_secret":"client-secret-here",
"client_kwargs":{
"scope": "openid"
},
"server_metadata_url": "https://<organisation>.onelogin.com/oidc/2/.well-known/openid-configuration"
}
}
]
每当我尝试通过单一登录提供程序登录超集时,都会收到以下错误消息。(我确认客户端 ID 是正确的):
File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 205, in fetch_token
headers=headers, **session_kwargs
File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 226, in _fetch_token
return self.parse_response_token(resp.json())
File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 380, in parse_response_token
self.handle_error(error, description)
File "/usr/local/lib/python3.7/site-packages/authlib/integrations/requests_client/oauth2_session.py", line 117, in handle_error
raise OAuthError(error_type, error_description)
authlib.integrations.base_client.errors.OAuthError: invalid_client: client authentication failed
我试过在秘密上使用base64,但同样的问题。
可能是什么问题?
解决方案
推荐阅读
- python - 为 groupby 中的每个子集查找每列中非空值的百分比
- python - 熊猫按优先顺序选择有条件的行
- php - 如何访问在 phpMyAdmin 上不同服务器上创建的 MySQL 数据库?
- javascript - TypeError: Object(...) is not a function “使用函数时面临的 React JS 问题”
- palantir-foundry - 在 Foundry Workshop 中,如何保存和写回场景中设置的所有值?
- javascript - TradingView javascript 小部件在 Shiny 中删除 UI
- authentication - 如何根据脚本输出在 HAProxy 请求中设置标头?
- java - android 动态预填充首选项
- visual-studio-code - 如何在 VS Code 中创建脚本来获取打开文件的所有相对路径?
- android - 在代码在 Android 9 中运行良好之后,getLastKnownLocation 在 Android 10 中始终返回 null