Skip to content

Commit

Permalink
README improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattMufson committed Aug 23, 2024
1 parent 7d7a27d commit d416f91
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,37 @@ navigator.credentials.get = function (options) {
import Passkey from 'electron-passkey';

ipcMain.handle('webauthn-create', (event, options) => {
return Passkey.handlePasskeyCreate(options);
return Passkey.getInstance().handlePasskeyCreate(options);
});

ipcMain.handle('webauthn-get', (event, options) => {
return Passkey.handlePasskeyGet(options);
return Passkey.getInstance().handlePasskeyGet(options);
});
```

### Entitlements Setup

> **_NOTE:_** Ensure your AASA is passing validation **BEFORE** you check it against Apple's CDN **AND BEFORE** you run your application with the entitlements or Apple may temporarily cache an invalid AASA and you will be stuck until they recheck
1) In developer.apple.com create an app identifier
2) Enable Associated Domains for your identifier
![AssociatedDomains](images/AssociatedDomains.png "Associated Domains")
3) You may need to create a provisioning profile for macOS development on your device and/or for distribution
4) Create a webserver to serve an AASA file [as specificed in the docs](https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domain-file-to-your-website)
5) Test it with the [yURL validator](https://branch.io/resources/aasa-validator/) and/or [branch.io validator](https://branch.io/resources/aasa-validator/)
6) Add the following to your entitlements plist
```plist
<key>com.apple.application-identifier</key>
<string>TEAMID.APP-ID</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:DOMAIN</string>
<string>webcredentials:DOMAIN</string>
</array>
```
7) Check to see if your AASA is being cached by the Apple CDN at `https://app-site-association.cdn-apple.com/a/v1/DOMAIN`
8) Build your electron application and sign it

### Deployments

![Deployments](Deployment.png "Deplyoments")
Binary file added images/AssociatedDomains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d416f91

Please sign in to comment.