tinovyatkin / pass-js

Apple Wallet Passes generating library for Node.JS
MIT License
675 stars 81 forks source link

is it possible to use this library on device? #227

Open Andriiklymiuk opened 4 years ago

Andriiklymiuk commented 4 years ago

Hi,

We try to use PassKit directly in our react native project. Is it somehow possible to use it that way and generate pass on device? Because now we are getting 'there is no module http2', etc. errors.

And by the way, thanks for the library)

bukira commented 4 years ago

I think you need a server to sign passes

Andriiklymiuk commented 4 years ago

oh, ok, thanks)

tinovyatkin commented 4 years ago

@bukira no, you don't need anything apart of this library to create pass - it's pure JavaScript implementation. On native script you probably will need to save buffer to a file then open it.

guisehn commented 4 years ago

Even though it could be possible to generate the pass using React Native directly in the device using the library, I don't think you should do that because you'd need to store your Apple Developer certificate and private key inside your app code. If someone is able to reverse engineer and get access to your code, they could issue passes on your behalf. That's why having a secure web server to issue your passes would be a better option.