# analyzeAuthFailureWithAI

**Kind:** Function

**Source:** [`atloria-monorepo/apps/cli/src/utils/ai-auth-debugger.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/cli/src/utils/ai-auth-debugger.ts#L127)

Ask AI to analyze authentication failure and suggest fixes

## Signature

```ts
async function analyzeAuthFailureWithAI(diagnostics: AuthDiagnostics, config: AuthConfig, debugGuideContent: string): Promise<{
  analysis: string;
  suggestedFixes: Array<{
    type: 'alert-handling' | 'selector-change' | 'timing-adjustment' | 'method-change';
    description: string;
    code?: string;
  }>;
}>
```

## Parameters

| Name | Type |
|---|---|
| `diagnostics` | `AuthDiagnostics` |
| `config` | `AuthConfig` |
| `debugGuideContent` | `string` |

**Returns:** `Promise<{
  analysis: string;
  suggestedFixes: Array<{
    type: 'alert-handling' | 'selector-change' | 'timing-adjustment' | 'method-change';
    description: string;
    code?: string;
  }>;
}>`
