Skip to content

Commit

Permalink
Update auth docs to mention cookie auth migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-sircar committed Mar 2, 2025
1 parent 5e722d6 commit fc5da85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ sequenceDiagram
AuthService->>AuthService: Verify bcrypt hash
AuthService->>AuthService: Generate JWT (1yr expiry)
AuthService->>Redis: Store token→user mapping
AuthService-->>Client: Return X-AUTH-TOKEN
AuthService-->>Client: Return `X-AUTH-TOKEN` cookie
Client->>AuthService: Request with Bearer token
AuthService->>AuthService: Verify JWT signature
Client->>AuthService: Request to `/api/*` with `X-AUTH-TOKEN` cookie
AuthService->>AuthService: Verify JWT signature from cookie
AuthService->>Redis: Validate token exists
Redis-->>AuthService: Session status
AuthService-->>Client: Grant/Deny access
Note right of AuthService: `X-AUTH-TOKEN` cookie is `HttpOnly`, `Secure`, `SameSite=Strict`
```

## Security Implementation
Expand Down

0 comments on commit fc5da85

Please sign in to comment.