// A previously issued recovery email can land at /code= when its email // template omitted the callback route. Bring that link through verification. export function legacyRecoveryToken(pathname: string) { const match = /^\/code=([A-Za-z0-9._~-]{8,2048})$/.exec(pathname); return match?.[1] ?? null; }