v4.2.0
What's new
Adds support for push credential expiry and keep-alive.
-
updateCredentialnow takes an optionalpushTokenand a newresetExpiryflag:// 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
pushTokenis omitted, the server keeps the stored token. -
AppCredentialnow exposesexpiresAt(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.
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).