@@ -22,11 +22,6 @@ This gem provides everything necessary to distribute Wallet Passes in pkpass for
22
22
* Push notifications: this is the most wanted feature I believe. Pull requests are welcome!
23
23
* Google Wallet integration: we use https://walletpasses.io/ on Android to read .pkpass format.
24
24
25
- ## Apple documentation
26
-
27
- * [ Apple Wallet Passes] ( https://developer.apple.com/documentation/walletpasses )
28
- * [ Send Push Notifications] ( https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns )
29
-
30
25
## Installation
31
26
32
27
Add this line to your application's Gemfile:
@@ -79,10 +74,27 @@ If you followed the installation steps and you have the ENV variables set, we ca
79
74
80
75
### Dashboard
81
76
82
- Head to ` http://localhost:3000/passkit/previews ` and you will see a first ` ExampleStoreCard ` available for download.
77
+ Head to ` http://localhost:3000/passkit/dashboard/ previews ` and you will see a first ` ExampleStoreCard ` available for download.
83
78
You can click on the button and you will obtain a ` .pkpass ` file that you can simply open or install on your phone.
84
79
The dashboard has also a view for logs, and a view for emitted passes.
85
80
81
+ By default the dashboard is protected with basic auth. Set the credentials using these ENV variables:
82
+ * ` PASSKIT_DASHBOARD_USERNAME `
83
+ * ` PASSKIT_DASHBOARD_PASSWORD `
84
+
85
+ You can also change the authentication method used (see example below for Devise):
86
+
87
+ ``` ruby
88
+ # config/passkit.rb
89
+
90
+ Passkit .configure do |config |
91
+ config.authenticate_dashboard_with do
92
+ warden.authenticate! scope: :user
93
+ # # redirect_to main_app.root_path unless warden.user.admin? # if you want to check a specific role
94
+ end
95
+ end
96
+ ```
97
+
86
98
### Mailer Helpers
87
99
88
100
If you use mailer previews, you can create the following file in ` spec/mailers/previews/passkit/example_mailer_preview.rb ` :
@@ -135,6 +147,12 @@ Again, check the example mailer included in the gem to see how to use it.
135
147
* In case of error "The passTypeIdentifier or teamIdentifier provided may not match your certificate,
136
148
or the certificate trust chain could not be verified." the certificate (p12) might be expired.
137
149
150
+
151
+ ## Apple documentation
152
+
153
+ * [ Apple Wallet Passes] ( https://developer.apple.com/documentation/walletpasses )
154
+ * [ Send Push Notifications] ( https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns )
155
+
138
156
## Development
139
157
140
158
After checking out the repo, run ` bin/setup ` to install dependencies. Then, run ` rake test ` to run the tests. You can also run ` bin/console ` for an interactive prompt that will allow you to experiment.
0 commit comments