feat: support platform attestation in SDK and sample#8
Conversation
📝 WalkthroughWalkthroughThe SDK adds optional Apple App Attest configuration, token generation, validation, and propagation through sign-in and sign-up flow initiation. The Quickstart sample documents and configures the feature, while tests cover default and validated configurations. ChangesPlatform attestation support
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Samples/Quickstart/Sources/AppAttestTokenProvider.swift`:
- Around line 105-108: Update makeChallenge() to check the OSStatus returned by
SecRandomCopyBytes instead of discarding it. If the call fails, populate the
32-byte challenge using Swift’s SystemRandomNumberGenerator; otherwise preserve
the existing securely generated bytes and return them as Data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5ce928db-74d2-4d1b-a76d-62e79f401c77
📒 Files selected for processing (9)
Samples/Quickstart/README.mdSamples/Quickstart/Sources/App.swiftSamples/Quickstart/Sources/AppAttestTokenProvider.swiftSamples/Quickstart/Sources/Config.plist.exampleSources/ThunderID/ThunderIDClient.swiftSources/ThunderID/ThunderIDConfig.swiftSources/ThunderID/auth/FlowExecutionClient.swiftSources/ThunderID/http/HTTPClient.swiftTests/ThunderIDTests/ThunderIDClientTests.swift
ed6dd80 to
3bc4e79
Compare
3bc4e79 to
bbba4d8
Compare
Purpose
Add platform attestation support to the iOS SDK and quickstart sample, matching the Android SDK (thunder-id/android-sdks#13).
Approach
ThunderIDConfiggainsattestationEnabled+ an app-suppliedattestationTokenProviderclosure (token minting is platform-specific, so it stays out of the core SDK).Attestation-Tokenheader on native flow-initiate requests (validated inThunderIDClient).AppAttestTokenProvider(Apple App Attest), gated byTHUNDERID_ATTESTATION_ENABLED.Related Issues
Related PRs
Checklist
Security checks
Summary by CodeRabbit