feat: implement trigger plugin frontend integration (#25283)

This commit is contained in:
lyzno1
2025-09-06 16:18:46 +08:00
committed by GitHub
parent 814787677a
commit a91e59d544
15 changed files with 886 additions and 83 deletions

View File

@ -293,13 +293,14 @@ class TriggerOAuthAuthorizeApi(Resource):
credential_type=CredentialType.OAUTH2,
credential_expires_at=0,
expires_at=0,
name=f"{provider_name} OAuth Authentication",
)
# Create response with cookie
response = make_response(
jsonable_encoder(
{
"authorization_url": authorization_url_response,
"authorization_url": authorization_url_response.authorization_url,
"subscription_builder": subscription_builder,
}
)
@ -377,6 +378,7 @@ class TriggerOAuthCallbackApi(Resource):
credential_type=CredentialType.OAUTH2,
credential_expires_at=expires_at,
expires_at=expires_at,
name=f"{provider_name} OAuth Authentication",
)
# Redirect to OAuth callback page
return redirect(f"{dify_config.CONSOLE_WEB_URL}/oauth-callback?subscription_id={subscription_builder.id}")