ostinelli / apnotic

A Ruby APNs HTTP/2 gem able to provide instant feedback.
MIT License
480 stars 96 forks source link

Support for multiple certificates and Team IDs #101

Closed mmalek-sa closed 3 years ago

mmalek-sa commented 3 years ago

Why Connection class sets the cert_path, team_id and key_id during its initialization? If I understand it correctly, it only uses these attributes for sending push notification and it has nothing to do with connection and connection_pool. This creates a problem that you can't use the same connection_pool and connection for sending push notifications to different apps that belong to different teams, organizations, etc. Is it possible to pass these attributes as parameters to push method instead?

I understand current implementation might be motivated by the need to set the SSL context during initialization but when auth_method is token, this seems like an unnecessary limitation.

mmalek-sa commented 3 years ago

According to Apple documentation:

APNs does not support authentication tokens from multiple developer accounts over a single connection.

Closing the ticket.