Skip to content

Commit 60994ec

Browse files
committed
fix: add explicit auth instructions to /docs:flow workflow
1 parent 670dc97 commit 60994ec

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

src/aidocs_cli/templates/workflows/flow/workflow.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,56 @@ Or run with --no-screenshots flag (not recommended).
363363

364364
### 6.2 Authenticate (if needed)
365365

366-
Load credentials from `docs/config.yml` or `docs/.auth`:
366+
**IMPORTANT:** Before capturing screenshots, check if authentication is required.
367+
368+
**Step 1: Check for credentials file**
369+
370+
Read the `docs/.auth` file if it exists:
371+
372+
```yaml
373+
# docs/.auth format:
374+
username: "[email protected]"
375+
password: "secretpassword"
376+
login_url: "/login" # optional, defaults to /login
377+
```
378+
379+
**Step 2: Check config for auth settings**
380+
381+
Also check `docs/config.yml` for auth configuration:
382+
383+
```yaml
384+
auth:
385+
method: file # or "env" or "manual"
386+
login_url: "/login"
387+
urls:
388+
base: "https://app.example.com"
389+
```
390+
391+
**Step 3: Perform login if credentials found**
392+
393+
If `docs/.auth` exists and contains credentials:
394+
395+
1. Navigate to login URL: `{base_url}/login` (or custom `login_url`)
396+
2. Wait for login form to load
397+
3. Fill username field (look for: input[type="email"], input[name="email"], #email)
398+
4. Fill password field (look for: input[type="password"], input[name="password"], #password)
399+
5. Click submit button (look for: button[type="submit"], input[type="submit"], button containing "Login"/"Sign in")
400+
6. Wait for redirect/navigation to complete
401+
7. Verify login succeeded (check for dashboard, user menu, or absence of login form)
367402

368403
```
369404
🔐 Authenticating...
370-
Using credentials from docs/.auth
405+
Reading credentials from docs/.auth
406+
Navigating to: https://app.example.com/login
407+
Filling login form...
408+
✓ Logged in successfully
409+
```
410+
411+
**If login fails:**
412+
```
413+
⚠️ Authentication failed
414+
Could not log in with provided credentials.
415+
Continuing without screenshots.
371416
```
372417
373418
### 6.3 Navigate to UI Page

0 commit comments

Comments
 (0)