Skip to content

Commit

Permalink
Document changes in device registration
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Dec 9, 2019
1 parent 598b0f1 commit cb86f04
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/Deploying-Push-Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ You can enable storing of sent messages in database using following property:
powerauth.push.service.message.storage.enabled=true
```

### Enabling Multiple Associated Activations in Device Registration

You can enable registration of multiple associated activations for a push token using following property:

```
powerauth.push.service.registration.multipleActivations.enabled=true
```

### APNS Environment Configuration

In order to separate development and production environment on APNS, you may want to set following property:
Expand Down
20 changes: 20 additions & 0 deletions docs/PowerAuth-Push-Server-0.23.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@ CREATE UNIQUE INDEX `push_device_activation` ON `push_device_registration`(`acti
```

In case either of the index updates fails, delete existing duplicate rows. Rows with newest timestamp_last_registered should be preserved.

## Device Registration Changes

Following changes of device registration have been applied in release `0.23.0`:
- A device can no longer be registered with the same `activationId` and multiple related `pushtoken` values.
This change was introduced because Google and Apple do not always expire existing push tokens. When the device
receives a new push token, the device registration endpoint updates the `pushtoken` value for an existing activation instead of
creating a new device registration. Thus the old push token is removed from database.
- It is no longer possible to register a device without associated activation. The `activationId` parameter must be
always sent with device registration request.
- It is possible to re-register a device with same `activationId` and `pushtoken`. The registration timestamp is updated in this case.
- It is possible to register a device with multiple `activationIds` associated with a single `pushtoken`. Such
device registration must be initiated using the new endpoint created for this use case:
[Create Device for Multiple Associated Activations](./Push-Server-API.md#create-device-for-multiple-associated-activations).
Multiple activations are used in master-child activation schemes. The functionality needs to be enabled
using a configuration property [for enabling multiple activations](./Deploying-Push-Server.md#enabling-multiple-associated-activations-in-device-registration),
because it is less secure than the case when a single associated activation is allowed for a push token.
- Database indexes are now applied to enforce database consistency for device registrations:
- The (`activationId`) value must be unique in the device registration table. Each `activationId` must have exactly one associated `pushtoken`.
- The (`activationId`, `pushtoken`) combination must be unique in the device registration table.

0 comments on commit cb86f04

Please sign in to comment.