Skip to content

v4.2.0

Choose a tag to compare

@stevenclouston stevenclouston released this 06 Jul 22:15
36d118f

What's new

Adds support for push credential expiry and keep-alive.

  • updateCredential now takes an optional pushToken and a new resetExpiry flag:

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

  • AppCredential now exposes 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.

Compatibility

updateCredential("token") calls work unchanged. One note: the parameter order is now (pushToken, resetExpiry, signer), so if you pass a signer, use a named argument: updateCredential(pushToken = token, signer = signer).