For this package to work, you need to configure your entitlements and provisioning profile correctly.
- Go to developer.apple.com/account
- Click on "Identifiers"
- Create a new App ID
- If you require webauthn to be available on every website, go to "Capability Requests" and apply for "Web Browser Public Key Credential Requests"
- If you have a specific website that you want to enable webauthn for, go to "Capabilities" and enable "Associated Domains". Then, add the associated domain file to your website.
- Register the App ID
You will need a provisioning profile to use these entitlements.
- Go to developer.apple.com/account
- Click on "Profiles"
- Create a new Provisioning Profile
- Choose a "Distribution" "Developer ID" profile. (which is used to distribute your app to users)
- Then, choose your newly created App ID.
- Download the provisioning profile.
- Put it in
build/profile.provisionprofile - Setup electron builder's config (or whatever builder you are using) to use this provisioning profile.
Add the following entitlements to your app:
<!-- Replace with your Team ID and Bundle ID. -->
<key>com.apple.application-identifier</key>
<string>TEAM_ID.com.example</string>
<!-- Enable webauthn for every domain. -->
<key>com.apple.developer.web-browser.public-key-credential</key>
<true/>
<!-- Or, enable webauthn for whitelisted domains. (Change example.com to your domain.) -->
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:example.com</string>
</array>