Comments (2)
I would say the JWT path is strictly better. The major functional difference is that p12s expire and need to be regenerated every year, and doing so generally requires using Apple's OS X Keychain utility, or using openssl directly. Cryptographically they're both considered secure. The JWT option is more recent, having been introduced by Apple several years into APNs' lifetime, and so probably has more lifetime in front of it as well.
(disclaimer: I cannot represent sideshow or apple - I'm just a rando who watches this repository, and this has just been my experience)
from apns2.
Heres how Apple explains:
Token-based authentication offers a stateless way to communicate with APNs. Stateless communication is faster than certificate-based communication because it doesn’t require APNs to look up the certificate, or other information, related to your provider server. There are other advantages to using token-based authentication:
- You can use the same token from multiple provider servers.
- You can use one token to distribute notifications for all of your company’s apps.
Because trust is established at the server-level, individual notification requests contain only your payload and a device token. They don't include an authentication token, which reduces the size of each notification request slightly.
Note that Apple stop short of suggesting which one to use but I agree with @froodian that tokens are generally superior, and you should use them if possible. Certs were the original way to authenticate before Apple bought in token based auth. As @froodian said, certs expire every year which can be annoying. You also have to make sure they are created for the right app and the right push environment (development vs sandbox), and you have to make sure you export them correctly and they are in the right format. Basically tokens are way simpler and less work.
from apns2.
Related Issues (20)
- How to specify the connection environment when using ClientManager
- ask a question for usage HOT 1
- Support for apns-push-type in header HOT 2
- silent push not working in iOS13 when run through xcode
- ios push notification multiple devices HOT 2
- Error causing frequent crashes HOT 4
- x509: certificate signed by unknown authority HOT 3
- write:broken pipe
- x509: certificate signed by unknown authority HOT 13
- About GeoTrust Global CA root certificate(removal) upgrade HOT 1
- Please drop Hyper and consider using http HOT 2
- Replace github.com/dgrijalva/jwt-go with github.com/golang-jwt/jwt HOT 2
- APNs urls should be in a config file HOT 1
- Replace github.com/dgrijalva/jwt-go
- Issue release with latest changes HOT 1
- Perf to be faster HOT 1
- Does apns support broadcast mode push ? HOT 1
- Missing Error Reason: Expired Token
- ios Live activity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apns2.