Skip to content

Conversation

@jchris
Copy link
Contributor

@jchris jchris commented Oct 26, 2025

Summary

This PR fixes critical issues blocking testing of the iframe auth implementation in PR #1279, without interfering with active development work.

Changes

🔴 Critical Bug Fix

  • to-cloud.ts:251 - Fixed inverted isErr() check that was breaking token flow
    • Was checking !rToken.isErr (property exists) instead of rToken.isErr() (is error)
    • This caused all token requests to fail

🔧 Build Fix

  • device-id-protocol.ts - Fixed TypeScript compilation error
    • Added missing CAActions import
    • Made actions parameter optional in interface
    • Proper type casting for empty array default

📝 Developer Guidance

Added TODO markers at 4 key locations where OAuth implementation needs completion:

  1. iframe-fpcc-protocol.ts:97 - Real OAuth token exchange logic
  2. fp-cloud-connect-strategy.ts:125 - Popup callback handler
  3. page-fpcc-protocol.ts:84 - App ID generation
  4. iframe-fpcc-protocol.ts:154 - Device ID integration

What This Enables

✅ TypeScript builds successfully (core modules)
✅ Token flow can be tested without silent failures
✅ Clear guidance on next implementation steps
✅ Doesn't remove console.logs or mock implementations (needed for dev)

Testing

Build passes:

pnpm core-cli tsc

No changes to test behavior - this unblocks testing infrastructure.

🤖 Generated with Claude Code

- Fix inverted isErr() check in to-cloud.ts that was breaking token flow
- Add TODO markers at 4 key OAuth integration points:
  * iframe-fpcc-protocol: Real token exchange needed
  * fp-cloud-connect-strategy: Popup callback handler needed
  * page-fpcc-protocol: App ID generation needed
  * iframe-fpcc-protocol: Device ID integration needed
- Leave device-id-protocol.ts actions commented out (incomplete implementation)

These changes unblock token flow testing without hiding incomplete work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jchris jchris force-pushed the jchris/iframe-noodling branch from 28a0889 to 2747020 Compare October 26, 2025 23:01
Add temporary stub implementation of CAActions.generateSerialNumber to
unblock builds while proper serial number generation is implemented.

The stub generates a timestamp-based serial number with random suffix.
This allows the device-id protocol to compile and function for testing
while the OAuth integration work continues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants