@detiq/crawler 1.1.27 → 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/crawler.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detiq/crawler",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
package/src/crawler.ts CHANGED
@@ -7013,6 +7013,18 @@ async function runAuthDiscoveryPhase(
7013
7013
  }
7014
7014
 
7015
7015
  const finalUrl = page.url?.() ?? current.url;
7016
+
7017
+ // Skip auth seed paths that redirect to a non-auth URL — the page captured would be the
7018
+ // post-login destination (e.g. dashboard) not the actual auth screen.
7019
+ if (current.source === 'seed_path' && finalUrl !== current.url) {
7020
+ try {
7021
+ const origPath = new URL(current.url).pathname;
7022
+ const finalPath = new URL(finalUrl).pathname;
7023
+ const isAuthSeed = /login|sign-?in|signin|auth|sso|forgot-?password|reset-?password|2fa|mfa/i.test(origPath);
7024
+ if (isAuthSeed && finalPath !== origPath) continue;
7025
+ } catch { /* non-parseable URL — allow capture */ }
7026
+ }
7027
+
7016
7028
  const captureKey = normalizeAuthUrl(finalUrl);
7017
7029
  if (!capturedKeys.has(captureKey)) {
7018
7030
  const result = await captureAuthDiscoveryScreen(page, opts, current.url, current.source, ordinal++);