matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
155 stars 140 forks source link

APNS device token get 400 for hexadecimal (original base64 ok). #301

Closed timabilov closed 2 years ago

timabilov commented 2 years ago

Describe the bug For APNS app i am unable to get notification if hexadecimal representation of the token used.

If in this code i change device_token = base64.b64decode(device.pushkey).hex() -> device_token = device.pushkey then it works as expected. I know that from Troubleshoot it was because of the backward compatibility, but then what i am doing wrong here? To be clear, by decoding and encoding my device token(base64.b64..) i do get my initial token. Can it be related to that? https://developer.apple.com/news/?id=uzyxiriy

To Reproduce

  1. Get any base64 token from device
  2. Call sygnal api with this base64 token
  3. you will get BadDeviceToken

Expected behavior Device should get the notification

Device IPhone 12 Pro Max

used p8 certificate sandbox environment

timabilov commented 2 years ago

it is react native push notification ios library which already does hexadecimal convert