Skip to content

Add support for Topics #21

@dimitribouniol

Description

@dimitribouniol

We should have a new type called Topic that accepts either a string, content, or data, and encodes the topic as a base64 url encoded string.

HOWEVER, push services only accept 32-character topics, so if the data is larger than 32 encoded bytes (24 source bytes?), it should be hashed first, then encoded and trimmed.

From a security point of view, perhaps it should always be hashed? The only important thing is that the topics are consistent. I don't think the service worker even sees them, so perhaps this can all be done transparently?

https://datatracker.ietf.org/doc/html/rfc8030#section-5.4

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions