mirror of
https://github.com/apache/superset.git
synced 2026-04-23 18:14:56 +00:00
feat: Support OAuth2 single-use refresh tokens (#38364)
This commit is contained in:
@@ -167,6 +167,10 @@ def refresh_oauth2_token(
|
||||
token.access_token_expiration = datetime.now() + timedelta(
|
||||
seconds=token_response["expires_in"]
|
||||
)
|
||||
# Support single-use refresh tokens
|
||||
if new_refresh_token := token_response.get("refresh_token"):
|
||||
token.refresh_token = new_refresh_token
|
||||
|
||||
db.session.add(token)
|
||||
|
||||
return token.access_token
|
||||
|
||||
Reference in New Issue
Block a user