diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d40213f8..8d1f6343 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -10,7 +10,7 @@ }, "app": { "security": { - "csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: asset: https:; connect-src 'self' http://localhost:11434 https://api.openai.com https://api.anthropic.com https://api.mistral.ai https://generativelanguage.googleapis.com" + "csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: asset: https:; connect-src 'self' http://localhost:11434 http://localhost:8765 https://api.openai.com https://api.anthropic.com https://api.mistral.ai https://generativelanguage.googleapis.com https://auth.atlassian.com https://*.atlassian.net https://login.microsoftonline.com https://dev.azure.com" }, "windows": [ { diff --git a/src/lib/tauriCommands.ts b/src/lib/tauriCommands.ts index e5c3c109..9c04741b 100644 --- a/src/lib/tauriCommands.ts +++ b/src/lib/tauriCommands.ts @@ -360,3 +360,30 @@ export const updateSettingsCmd = (partialSettings: Partial) => export const getAuditLogCmd = (filter: AuditFilter) => invoke("get_audit_log", { filter }); + +// ─── OAuth & Integrations ───────────────────────────────────────────────────── + +export interface OAuthInitResponse { + auth_url: string; + state: string; +} + +export interface ConnectionResult { + success: boolean; + message: string; +} + +export const initiateOauthCmd = (service: string) => + invoke("initiate_oauth", { service }); + +export const handleOauthCallbackCmd = (service: string, code: string, stateKey: string) => + invoke("handle_oauth_callback", { service, code, stateKey }); + +export const testConfluenceConnectionCmd = (baseUrl: string, credentials: Record) => + invoke("test_confluence_connection", { baseUrl, credentials }); + +export const testServiceNowConnectionCmd = (instanceUrl: string, credentials: Record) => + invoke("test_servicenow_connection", { instanceUrl, credentials }); + +export const testAzureDevOpsConnectionCmd = (orgUrl: string, credentials: Record) => + invoke("test_azuredevops_connection", { orgUrl, credentials }); diff --git a/src/pages/NewIssue/index.tsx b/src/pages/NewIssue/index.tsx index 44dc38e8..782d20ed 100644 --- a/src/pages/NewIssue/index.tsx +++ b/src/pages/NewIssue/index.tsx @@ -162,7 +162,7 @@ export default function NewIssue() { + + + + + {testResults.confluence && ( +
+ {testResults.confluence.success ? ( + + ) : ( + + )} + {testResults.confluence.message}
- - - - {integration.name} - - {integration.description} - - -
    - {integration.features.map((feature) => ( -
  • -
    - {feature} -
  • - ))} -
-
- - ))} + )} + + + + {/* ServiceNow */} + + + + + ServiceNow + + + Link incidents and push resolution steps. Uses basic authentication (username + password). + + + +
+ + updateConfig("servicenow", "baseUrl", e.target.value)} + /> +
+ +
+ + updateConfig("servicenow", "username", e.target.value)} + /> +
+ +
+ + +

+ ServiceNow credentials are stored securely after first login. OAuth2 not supported. +

+
+ +
+ + + +
+ + {testResults.servicenow && ( +
+ {testResults.servicenow.success ? ( + + ) : ( + + )} + {testResults.servicenow.message} +
+ )} +
+
+ + {/* Azure DevOps */} + + + + + Azure DevOps + + + Create work items and attach RCA documents. Requires OAuth2 authentication with Microsoft. + + + +
+ + updateConfig("azuredevops", "baseUrl", e.target.value)} + /> +
+ +
+ + updateConfig("azuredevops", "projectName", e.target.value)} + /> +
+ +
+ + + +
+ + {testResults.azuredevops && ( +
+ {testResults.azuredevops.success ? ( + + ) : ( + + )} + {testResults.azuredevops.message} +
+ )} +
+
+ +
+

How OAuth2 Authentication Works:

+
    +
  1. Click "Connect with OAuth2" to open the service's authentication page
  2. +
  3. Log in with your service credentials in your default browser
  4. +
  5. Authorize TFTSR to access your account
  6. +
  7. You'll be automatically redirected back and the connection will be saved
  8. +
  9. Tokens are encrypted and stored locally in your secure database
  10. +
);