Navigator.credentials is undefined

I want to implement Webauthn in my capacitor ionic vue app.

It should be supported and it navigator.credentials is available everywhere (desktop safari, mobile Safari even when I use the native browser from capacitor using @capacitor/browser to open a page I can see that navigator.credentials is available.

But it stays undefined when accessing it directly from my application.

I have tried:

  • Changing the capacitor.config.ts file to use a localhost as hostname (since this is recommended for navigator.geolocation by capacitor)
  • Changing the capacitor.config.ts to use a different UserAgent by using overrideUserAgent to excacyl match that of my safari browser on ios

I don’t know what else to try.

also not only navigator.credentials is missing but also navigator.serviceWorker and navigator.mediaDevices (but fixes for these two did not fix my issue)