ruby - Encoding JWT key for APNS using rails RPUSH gem -
i want use jwt key send push notifications
i searched libraries implementing jwt token standard: https://jwt.io/
so found ruby-jwt gem: https://github.com/jwt/ruby-jwt
but seems can't create key structure required apple:
{ "alg": "es256", "kid": "abc123defg" } { "iss": "def123ghij", "iat": 1437179036 }
also, how should use apns auth key (.p8 mime-type) generate jwt token?
any advices welcome
update
ok, found out, possible add custom fields header https://github.com/jwt/ruby-jwt/pull/8/files
anyways, how should use apns auth key? rpush gem supports jwt tokens?
here ruby gem new p8 format uses http2 , jwt https://github.com/andrewarrow/p8push
Comments
Post a Comment