pywebpush
pywebpush copied to clipboard
How to set the `aud` for localhost
Chrome/Chromium require the aud parameter in the vapid claims (403 error asking for it is returned otherwise).
However just setting this to http://localhost:port doesn't seem to work (it's not recognized as a valid aud)
Ups, I was mistaken here, the aud is supposed to be the actual push service origin (e.g. https://fcm.googleapis.com for chromium`) -- in this case, should this parameter be automatically extracted from the subcription info being passed?
Could make a PR with this fix if so.
we should be extracting the aud from the vapid claims, so long as it's not present (e.g. it's None not an empty string). Is that not working for you?