We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I`m creating a push notification for Apple (APNs). Code is simple:
-spec generate_token(binary(), binary(), string()) -> binary(). generate_token(TeamId, KeyId, KeyPath) -> PrivateJWK = jose_jwk:from_pem_file(KeyPath), JWK = jose_jwk:to_map(PrivateJWK), JWS = #{ <<"alg">> => <<"ES256">>, <<"kid">> => KeyId }, JWT = #{ <<"iss">> => TeamId, <<"iat">> => apns_utils:epoch() }, Signed = jose_jwt:sign(JWK, JWS, JWT), {_, Token} = jose_jws:compact(Signed), Token.
Key is *.p8
But apns answer with:
{403,[{<<"apns-id">>,<<"1294465C-E2AA-61D5-E49A-72E1A3C70BDC">>}],#{<<"reason">> => <<"InvalidProviderToken">>}}
I went to https://jwt.io and got the same answer.
What I do wrong?
The text was updated successfully, but these errors were encountered:
@Akick did you ever figure out the issue? I have the same problem.
Sorry, something went wrong.
@jbosse Yup. I used https://github.com/G-Corp/jwerl
No branches or pull requests
I`m creating a push notification for Apple (APNs). Code is simple:
Key is *.p8
But apns answer with:
I went to https://jwt.io and got the same answer.
What I do wrong?
The text was updated successfully, but these errors were encountered: