Skip to content

feat(push): resetExpiry flag + optional pushToken (AUT-3576)#103

Merged
stevenclouston merged 12 commits into
mainfrom
aut-3573-push-credential-expiry
Jul 7, 2026
Merged

feat(push): resetExpiry flag + optional pushToken (AUT-3576)#103
stevenclouston merged 12 commits into
mainfrom
aut-3573-push-credential-expiry

Conversation

@stevenclouston

@stevenclouston stevenclouston commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What's new

Adds support for push credential expiry and keep-alive.

  • updateCredential now accepts an options object with an optional pushToken and a new resetExpiry flag:

    // Rotate the push token (existing behaviour, unchanged)
    await authsignal.push.updateCredential({ pushToken });
    
    // Keep-alive: reset the credential's expiry lease without changing the token
    await authsignal.push.updateCredential({ resetExpiry: true });
  • When pushToken is omitted, the server keeps the stored token.

  • getCredential results now include expiresAt (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 updateCredential response now includes the refreshed expiresAt.

  • 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).

@stevenclouston stevenclouston changed the title feat(push): extend flag + optional pushToken (AUT-3576) feat(push): resetExpiry flag + optional pushToken (AUT-3576) Jun 30, 2026
…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.
@stevenclouston stevenclouston marked this pull request as ready for review July 3, 2026 04:14
Also corrects the hardcoded iOS wrapper metadata version, which was
still 3.0.0 while the package was at 3.1.0.
@stevenclouston stevenclouston merged commit c5c1750 into main Jul 7, 2026
1 check passed
@stevenclouston stevenclouston deleted the aut-3573-push-credential-expiry branch July 7, 2026 01:27
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.

2 participants