Skip to content

Decode web push messages #7

Description

@nneskildsf

Hi

Thank you for this very nice repository. This has been really helpful to get started with Web Push with Fast API. I have created a minimal example which is a blend of the Python code in this repository and the HTML/JS from https://github.com/vppillai/simpleWebPushServer. My minimal example can demonstrate web push in a local web browser.

Perhaps it could be a useful example to include in this repository? If so you are welcome to grab the code and put it where you think it fits.

Anyways, what I want to ask about is listening to Web Push.
I would like to make a service which can subscribe to the /notification/subscribe endpoint and listen for messages. It is no problem to subscribe and to receive messages. However, I do get trouble when I need to decode the messages. I have managed to find one issue web-push-libs/encrypted-content-encoding#56 which deals with this but unfortunately the code does not run (raises cryptography.exceptions.AlreadyFinalized).

Do you have experience with decoding of the messages?

Br Eskild

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions