aroundtheworld
aroundtheworld

Reputation: 782

Can a chrome extension directly initiate the (chrome) WebAuthn / PassKey dialogue?

I have a TS-based web app that calls upon WebAuthn and opens the chrome dialogue to select PassKey method - working as expected.

When the same code is used inside a chrome extension, the request to the server for auth is received and returns the first part of the response with no errors (200), however no WebAuthn native dialogue appears. Still no network or log errors on front or back end.

I am struggling to find any documentation that suggests how a chrome extension does or does not handle WebAuthn / PassKeys directly.

Upvotes: 2

Views: 594

Answers (2)

agl
agl

Reputation: 1682

Background pages, when open in a tab, can use WebAuthn. Leave the rp.id field blank and the RP ID will be chrome-extension://…. (I.e. this is only useful for extensions issuing credentials to themselves, so think about that first because it's a significant limitation.)

There is support behind a flag in Chrome to allow background pages to use a regular origin as an RP ID and something might be done with manifests too, but none of that is released yet.

Upvotes: 2

aroundtheworld
aroundtheworld

Reputation: 782

Having spoken to the author of https://github.com/MasterKale/SimpleWebAuthn

The general answer seems to be 'not really' right now, but is a work in progress with the respective parties.

Upvotes: 1

Related Questions