From reading the Apple documentation, the flow for using and updating Wallet passes goes like this:
- User taps an "add to wallet" button
- App calls its API which provides a pkpass file
- App presents the pass to the system, which triggers usual UI flow to add it to wallet
The pass contains a webServiceURL
property, which points at my API which handles the POST and DELETE commands described in the docs, and also requires an authenticationToken
to authenticate it. These two things together are used by iOS to request updates to a pass or to delete it, independent of anything my apps do.
This token is what concerns me. It's a token that I provide to Apple, and they provide back to me to authenticate against my own service. This is not an OAuth flow, it's just a string that identifies the user in a secure way (e.g. a hash of a user ID). Does this token need to be created in any particular way (e.g. a JWT), am I free to invent something, or is there some other convention for this?
I'm also unclear about when this endpoint will be called. Will it be called automatically when an expiry time approaches? Does it need to be kicked via a push notification to tell it to update?