Open zhangms143 opened 4 months ago
I had the same issue, and found a fix on the problem and replaced the code in the following lines
---- AbstractPushService.java ----
Line 211: headers.put("Crypto-Key", headers.get("Crypto-Key") + ";p256ecdsa=" + Base64.getUrlEncoder().withoutPadding().encodeToString(pk));
Line 212: headers.put("Crypto-Key", "p256ecdsa=" + Base64.getUrlEncoder().encodeToString(pk));
I'm trying to use web-push to push messages, and it works fine on Microsoft Chrome, but Google Chrome gets error 403 Forbidden.(Use the same key pair)
return message: the VAPID credentials in the authorization header do not correspond to the credentials used to create the subscriptions.
How do I fix it?