setPushSubscription

Set or update a push subscription endpoint for this device.

💾 This method alters the persisted account state.

This method registers the given webpush subscription with the FxA server, requesting that is send notifications in the event of any significant changes to the user's account. When the application receives a push message at the registered subscription endpoint, it should decrypt the payload and pass it to the * FirefoxAccount::handle_push_message method for processing.

Arguments

- `subscription` - the [`DevicePushSubscription`] details to register with the server.

Notes

- Device registration is only available to applications that have been
  granted the `https:///identity.mozilla.com/apps/oldsync` scope.