You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I'm facing issue about subscription step.
On Firefox
Subscription error.
Arguments
0: DOMException: Invalid raw ECDSA P-256 public key.
On chrome
Subscription error. Arguments [DOMException: Failed to execute 'subscribe' on 'PushManager': The provided applicationServerKey is …, callee: ƒ, Symbol(Symbol.iterator): ƒ]
I generate vapid keys by using python package py-vapid==1.7.1
by using command vapid --gen for public and private keys
my settings.py contains:
from django.views.decorators.http import require_http_methods
from django.shortcuts import render, redirect
@require_http_methods(["GET"])
def index(request):
webpush = {
"group": "my_group"
} # The group_name should be the name you would define.
return render(request, "push_notification/index.html", {"webpush": webpush})
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEONKLXu1hkjwHIYxgERnucAfOjunh
h7ZGtgxNi7kXUU/+jyhHeC6YkTSzpwIkn2q6ibguVmJL5j9BriKgaqst1Q==
-----END PUBLIC KEY-----
@safwanrahman yeah why not, but the true question is this is normal you wrote the code with public key use and today i can use it only with the server key?
Maybe i doing mistake.
I'm ok to PR but if do it, for me we have to change every variable name about vapid_public_key to vapid_public_server_key.
Hello!
I'm facing issue about subscription step.
On Firefox
On chrome
I generate vapid keys by using python package
py-vapid==1.7.1
by using command
vapid --gen
for public and private keysmy settings.py contains:
I wrote a view to render django template tags:
my template:
in browser:
firefox
chrome
My public key is:
My private key is:
in the template:
i don't now how to better investigage on this issue.
The text was updated successfully, but these errors were encountered: