feat(push): resetExpiry flag + optional pushToken (AUT-3576)#103
Merged
Conversation
…AUT-3576) The TS types promised expiresAt/isExpired on AppCredential but neither bridge mapped them, so they were always undefined in JS. Map them on get/add credential and surface expiresAt on the update response, which also gains an optional pushToken (absent for keep-alive calls). Pin the native SDK versions that actually contain the expiry work: iOS 2.12.0 and Android 4.2.0 (the released 2.11.0/4.1.0 predate it).
Matches the server wire format. Bridges pass the epoch number through; the example formats it for display.
chrisfisher
approved these changes
Jul 3, 2026
Also corrects the hardcoded iOS wrapper metadata version, which was still 3.0.0 while the package was at 3.1.0.
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.
What's new
Adds support for push credential expiry and keep-alive.
updateCredentialnow accepts an options object with an optionalpushTokenand a newresetExpiryflag:When
pushTokenis omitted, the server keeps the stored token.getCredentialresults now includeexpiresAt(ISO timestamp), so you can check when the credential's lease lapses and re-enroll in time. Expired credentials are rejected by the server and cannot be revived.The
updateCredentialresponse now includes the refreshedexpiresAt.Example app: new Reset Expiry and Copy Public Key buttons, and credential output shows the expiry fields.
Compatibility
Fully backward compatible: the existing
updateCredential('token')string form still works.Requires the native SDK releases that ship this feature: iOS 2.12.0 and Android 4.2.0 (pinned in this PR).