GitHub user Donxiaohao created a discussion:
ERROR:flask_appbuilder.security.views:Error returning OAuth user info:
invalid_token: The token is not valid as it was issued in the future
superset version : 4.1.4
authlib version:1.3.2
superset_config.py info :
from flask_appbuilder.security.manager import AUTH_OAUTH
import os
AUTH_TYPE = AUTH_OAUTH
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Public"
OAUTH_PROVIDERS = [
{
"name": "authentik",
"token_key": "access_token", # OAuth2 标准字段,无需修改
"icon": "fa-fingerprint", # 前端登录按钮图标(Font Awesome 图标)
"remote_app": {
"api_base_url": "http://192.168.10.1:9000/",
"client_kwargs": {
"scope": "openid email profile",
"verify_signature": True,
},
"access_token_url": (
"http://192.168.10.1:9000/application/o/token/"
),
"authorize_url": (
"http://192.168.10.1:9000/application/o/authorize/"
),
'jwks_uri':
'http://192.168.10.1:9000/application/o/superset/jwks/',
"client_id": "7Vf3o2DlHx4AAADMfwcbenrS3XT2S3b6G8sBJlzv", #
替换为你的 authentik Client ID
"client_secret":
"Aj1K8ZsA44fGBTVOna8QQqdVSbSJOuteFtYkn90CDJrzU0IFAyTBFEEorK1GajEFpPXh1hMwMEYxn9ucQjrROenxIKRhlHiQrx2TnBeNkcm0hckJPPWX84DZku2KGsGn",
"server_metadata_url":
"http://192.168.10.1:9000/application/o/superset/.well-known/openid-configuration",
}
}
]
When I check the authentik service logs, it shows successful authentication.
However, when viewing the Superset logs, the following error appears:
2025-12-25 09:42:00,411:DEBUG:clickhouse_connect.json_impl:Using python
library for writing JSON byte strings
192.168.10.3 - - [25/Dec/2025:09:42:01 +0000] "GET /login/ HTTP/1.1" 200 88179
"-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/143.0.0.0 Safari/537.36"
192.168.10.3 - - [25/Dec/2025:09:42:03 +0000] "GET /login/authentik?next=
HTTP/1.1" 302 945 "http://192.168.10.2:8088/login/" "Mozilla/5.0 (Windows NT
10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0
Safari/537.36"
2025-12-25 09:42:08,679:ERROR:flask_appbuilder.security.views:Error returning
OAuth user info: invalid_token: The token is not valid as it was issued in the
future
192.168.10.3 - - [25/Dec/2025:09:42:08 +0000] "GET
/oauth-authorized/authentik?code=90b3eec14ee44719ae5131548ab0e3d0&state=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuZXh0IjpbIiJdfQ.oBGIE3QtlQzIfY_ZqJ7hhzEZKTYuJnNzCQsB8rmD3d4
HTTP/1.1" 302 201 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
192.168.10.3 - - [25/Dec/2025:09:42:08 +0000] "GET /login/ HTTP/1.1" 200 88346
"-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/143.0.0.0 Safari/537.36"
2025-12-25 09:42:11,104:DEBUG:superset.stats_logger:[stats_logger] (incr) health
127.0.0.1 - - [25/Dec/2025:09:42:11 +0000] "GET /health HTTP/1.1" 200 2 "-"
"curl/7.88.1"
What should I do
GitHub link: https://github.com/apache/superset/discussions/36836
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]