Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandercerutti/fastify-passkit-webservice
Easy-to-plug integration of Apple Wallet Web Services with Fastify
https://github.com/alexandercerutti/fastify-passkit-webservice
apple apple-wallet fastify fastify-plugin passkit
Last synced: 2 months ago
JSON representation
Easy-to-plug integration of Apple Wallet Web Services with Fastify
- Host: GitHub
- URL: https://github.com/alexandercerutti/fastify-passkit-webservice
- Owner: alexandercerutti
- Created: 2023-11-22T00:14:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-16T23:23:14.000Z (3 months ago)
- Last Synced: 2024-11-24T18:34:27.269Z (2 months ago)
- Topics: apple, apple-wallet, fastify, fastify-plugin, passkit
- Language: JavaScript
- Homepage:
- Size: 108 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Fastify Passkit WebService
Integrate Apple Wallet Web services in your current fastify integration.
## Architecture
Fastify Passkit Webservice, as the name says, wraps Apple Wallet specifications into a Fastify integration.
It exposes a set of plugins that will let yourself to dedicate exclusively to the integration of the business logic.
Each plugin represents a subscription to an endpoint defined in [Apple Wallet Developer Documentation](https://developer.apple.com/documentation/walletpasses/adding_a_web_service_to_update_passes).
Everything is designed to provide a good developer esperience. It is fully compatible with Typescript.
This package is an integration of [passkit-webservice-toolkit](https://github.com/alexandercerutti/passkit-webservice-toolkit).
### Installation
```sh
$ npm install fastify-passkit-webservice
```---
## API Documentation
All the details are available in the dedicated project [wiki page](https://github.com/alexandercerutti/fastify-passkit-webservice/wiki/API-Documentation-Reference).
---
### Usage example
All the exposed middlewares work like this:
```js
import Fastify from "fastify";const app = Fastify();
app.register(import("../lib/plugins/v1/registration.js"), {
async onRegister(
deviceLibraryIdentifier,
passTypeIdentifier,
serialNumber,
pushToken,
) {
/** your implementation */
},
async onUnregister(
deviceLibraryIdentifier,
passTypeIdentifier,
serialNumber,
) {
/** your implementation */
},
async tokenVerifier(token) {
/** your implementation */
},
});
```Give a look at `specs/server.mjs` for fully example.