pywebpush icon indicating copy to clipboard operation
pywebpush copied to clipboard

How to set the `aud` for localhost

Open George3d6 opened this issue 1 year ago • 2 comments

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)

George3d6 avatar Dec 28 '23 08:12 George3d6

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.

George3d6 avatar Dec 28 '23 08:12 George3d6

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?

jrconlin avatar Dec 28 '23 17:12 jrconlin