Creating a publisher-provided ID

When associating entitlements with a reader’s Google Account, publishers must create a publisher-provided identifier (PPID). The PPID is associated client-side, and used in subsequent server-side calls for referring to the reader. The PPID can be an existing publisher identifier for the reader, or a newly created one, but must be stable for the reader. It cannot be updated without the reader deleting and re-linking their account.

The initial association between a Google Account and a PPID is done exclusively via the client-side JavaScript api. All other features are done via the server-side integration.

//PPIDs must conform to RFC3986 Section 2.3
//https://www.ietf.org/rfc/rfc3986.txt
const publisherProvidedId = 'ASDF_jkl-1234.~'