Repository navigation
Return and accept the standard IronCore device format - #151
Merged
Merged
Conversation
skeet70
requested review from
BobWall23 and
coltfred
and removed request for
a team and
BobWall23
October 14, 2026 17:47
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 #27. Closes #137. Closes #91.
User.generateDeviceKeys()now returns the device format shared by the other IronCore SDKs (accountId,segmentId,devicePrivateKey,signingPrivateKey) plus the new device'sdeviceId,name,created, andlastUpdated, matching ironoxide'sDeviceAddResult. ThedeviceIdcomes from the device add response, which was previously discarded, and can be passed toSDK.user.deleteDevice()to revoke the device.initialize()accepts aDeviceContextobject in addition to the existing four positional arguments, so the result ofgenerateDeviceKeys()or a device JSON from ironoxide can be passed directly.This is additive and goes out as 1.3.0. The old
accountID,segmentID,deviceKeys, andsigningKeysfields are still returned and marked@deprecatedinironnode.d.ts.SDK.user.listDevices()is typed with the newUserDeviceinterface, which addspublicSigningKey. The API already returns it (IronCoreLabs/ironcore-id#853) and the SDK already passed it through, so this is a type-only change, matching ironweb'sUserDevice.Added
SDK.user.deleteDeviceByPublicSigningKey(publicSigningKey)andIronNode.User.deleteDeviceByPublicSigningKey(jwt, publicSigningKey), matching ironweb's pair. Both resolve with{id}likedeleteDevice(). Deleting the SDK's own device throughSDK.userclears the session, the same asdeleteDevice()with no ID.UserDevice.nameis nowstring | null. ironcore-id returnsnullfor devices created without adeviceName. TypeScript callers that readnamewithout a null check will see a compile error, but this ships in 1.3.0 as a bug fix.Other changes:
integration/sdkOperation.tsinitializes from the saved device object. A.device.jsongenerated before this change needs to be regenerated.examples/.device_keysis converted to the shared format (same keys), andexamples/dek-reuseusesinitialize(deviceContext)with^1.3.0. Itsyarn.lockstill pins 1.2.0 and needsyarn upgrade @ironcorelabs/ironnodeonce 1.3.0 is published.Docs: IronCoreLabs/website#1508.
Verification
tsc --noEmit, and the full jest suite pass (391 tests).initialize()fromsrc/with the convertedexamples/.device_keyssucceeded against the live API.SDK.user.deleteDeviceByPublicSigningKey()with a nonexistent key containing/and+reached the live API route and was rejected as not accessible for the user; the session and device list were unaffected.generateDeviceKeys()was not run against the live API, since it creates a device.