Comments (14)
@raphaeljlps The PR is here #43 however we are still blocked by the way the golang http2 implementation interprets the MAX_CONCURRENT_STREAMS
header.
The two options to move this issue forward are;
- Suggest alterations to the http/2 library and hope that it gets picked up in an upcoming version of go.
- Patch the http/2 library and include a forked version in this package in the interim.
None of these are amazing, but open to suggestions to move it forward.
from apns2.
Done :)
from apns2.
@nathany Good idea - could be the best solution for now. Agree it's a bit hacky but would allow us to move forward!
from apns2.
@sideshow A third option might be just to hack it? Assume 1 request at a time until the first one succeeds, then bring up a worker pool. One thing I'm not sure about though is if the connection is lost, in which case it may need to drop back down to 1 request at a time on a new connection.
from apns2.
@markschmid The library that you linked to suffers from the same issue when used asyncronously, I was able to reproduce the error (stream error: stream ID xx; REFUSED_STREAM
) by modifying his sample code in his library to illustrate.
Here is his sample code with lines 101-115 modified to use async behaviour and reproduce the problem https://gist.github.com/sideshow/b4d8898e76813216d1fc2b8ad12e4eef#file-test-go-L105-L115
If you haven't encountered this bug then you may not be using his library in an async manner and in that case you would be better to the apps/2 feature-auth-token
branch which has test coverage https://github.com/sideshow/apns2/tree/feature-auth-token
from apns2.
Haven't been aware of the feature-auth-token branch. Great stuff, thanks.
from apns2.
@vivangkumar I have been working on this.
Should have the first version in the next few days (as a branch) and would love feedback around the implementation.
from apns2.
That's great news. Sure, I'll pop back once the branch is up and have a look :) Thanks!
from apns2.
Hey @vivangkumar
Please see initial working example of Token based Auth here #43
This has been tested as working on production APNS
Any comments and critique welcome
from apns2.
I use "github.com/dgrijalva/jwt-go" to generate jwt-token. Here is an example https://github.com/laozi2/token-auth-apns-http2-proxy
from apns2.
For a list of various JWT libraries, see https://jwt.io/ and click Libraries and Filter By "Go".
from apns2.
Thanks guys. I ended up using jwt-go. Here is my [WIP] PR #43
from apns2.
@sideshow any updates on this feature?
from apns2.
We're also eagerly looking forward to this functionality. :)
Currently we're using https://github.com/soh335/apnsapi with Token Authentication but would like to switch to this library (apns2) as soon as possible.
In the meantime, is there a known workaround that allows to use apns2 with Token Authentication already?
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
- What are the pros and cons of using a p12 certificate vs JWT? HOT 2
- 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.