mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore(OAuth2): refactor for custom OAuth2 clients (#27880)
This commit is contained in:
@@ -1115,9 +1115,13 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
||||
if database is None:
|
||||
return self.response_404()
|
||||
|
||||
oauth2_config = database.get_oauth2_config()
|
||||
if oauth2_config is None:
|
||||
raise OAuth2Error("No configuration found for OAuth2")
|
||||
|
||||
token_response = database.db_engine_spec.get_oauth2_token(
|
||||
oauth2_config,
|
||||
parameters["code"],
|
||||
state,
|
||||
)
|
||||
|
||||
# delete old tokens
|
||||
|
||||
Reference in New Issue
Block a user