feat(pqa): advanced signatures - #479
Open
smanikw wants to merge 5 commits into
Open
Conversation
smanikw
requested review from
kober32
and removed request for
a team and
kober32
September 2, 2026 19:03
smanikw
force-pushed
the
pqa/advanced-signatures
branch
from
September 3, 2026 08:29
1d4ae09 to
3e1d579
Compare
smanikw
force-pushed
the
pqa/advanced-signatures
branch
2 times, most recently
from
September 7, 2026 12:11
d0c47b1 to
bde5ddf
Compare
Use the existing two-argument constructAuthentication helper on iOS for advanced signing APIs, and add Flutter-parity coverage for tampered data and authentication-purpose rejection on the new signature methods.
Match existing iOS callback comments so the deliberate (void)auth retention is not mistaken for dead code and removed.
Use the function form of expect().toSucceed() so successful verify* calls are actually awaited and failures fail the test.
smanikw
force-pushed
the
pqa/advanced-signatures
branch
from
September 8, 2026 13:25
bde5ddf to
61eb16b
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new CSR E2E test parses PEM using split('\n') and can fail if native output uses CRLF line endings, making the test brittle across platforms.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds “advanced signatures” support across the shared JS API and both native bridges (Android + iOS), including explicit signature key identifiers, digital signatures, JWS/JWT signing & verification, device public-key export, and CSR generation, with accompanying E2E coverage and documentation updates (closes #461, #295).
Changes:
- Added new public API methods on
PowerAuthfor digital signatures, JWS/JWT signatures, CSR creation, and device public-key export, plus new key-id/type models. - Implemented the corresponding native bridge methods in iOS and Android (React Native + Cordova).
- Extended the testapp E2E suite with protocol-4 configuration support and new advanced-signature tests; updated docs/changelog accordingly.
File summaries
| File | Description |
|---|---|
| testapp/src/IntegrationUtils.ts | Allows E2E helper to select PowerAuth algorithm (legacy default; protocol-4 suites can opt in). |
| testapp/_tests/PowerAuth_Signature.test.ts | Extends authentication-purpose negative coverage to new advanced-signature APIs. |
| testapp/_tests/PowerAuth_AdvancedSignature.test.ts | New E2E suite for device public keys, ML-DSA signatures, JWS, and CSR. |
| testapp/_tests/AllTests.ts | Registers the new advanced-signature test suite. |
| packages/lib-shared/js/PowerAuth.ts | Adds the new public JS API surface and deprecates legacy helpers in favor of explicit key ids. |
| packages/lib-shared/js/model/PowerAuthSignatureKeyId.ts | Introduces key-id and key-type enums for selecting signing/verification keys. |
| packages/lib-shared/js/model/PowerAuthDevicePublicKey.ts | Adds public model types for exported device public keys. |
| packages/lib-shared/js/index.ts | Exposes the new model types via the package public exports. |
| packages/lib-shared/ios/PowerAuth/PowerAuthModule.m | Implements iOS bridge for digital signature/JWS/CSR/public-key export and key-id parsing. |
| packages/lib-shared/android/.../PowerAuthJsModule.kt | Implements Android bridge for the same features, including key-id parsing and CSR SAN handling. |
| packages/lib-rn/android/.../PowerAuthModule.java | Exposes new Android bridge methods to React Native. |
| packages/lib-cordova/android/.../PowerAuthModule.kt | Adds Cordova action dispatch + argument wiring for new features. |
| packages/lib-cordova/android/.../bridge/Mappings.kt | Adds optional ReadableArray mapping needed for CSR SAN argument. |
| docs/Data-Signing.md | Updates user docs to the new APIs and clarifies Base64 handling and deprecations. |
| docs/Changelog.md | Records the new advanced-signature feature set in the changelog. |
Review details
- Files reviewed: 15/15 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+145
to
+147
| const lines = csr.trim().split('\n') | ||
| expect(lines[0]).toBe('-----BEGIN CERTIFICATE REQUEST-----') | ||
| expect(lines[lines.length - 1]).toBe('-----END CERTIFICATE REQUEST-----') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #461 #295