Key Rotation
Rotating your API Key is important for both security reason (when a key is deemed compromizesd) or when seed data changes, i.e. a user decided to change their credentials.
It is important to offer your users ability to rotate old keys into new ones when your users choose to change your app's credentials.
prefs_us.getkey("oldkeyid", ["current","key","seed"],
function(response) {
if (response.success) {
prefs_us.rotate("newkeyid", ["new","key","seed"])
}
}
)
Key Rotation Atomicity
Key rotation follows principles of atomicity that ensures that the entire operation completes successfully or, if any part of the process fails, the entire transaction is cancelled, and all partial changes are undone.