From 6bdd2331b988d981be58953b28ec93a2c3412b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Wed, 25 May 2022 22:37:14 +0200 Subject: [PATCH] feat: set 'npm-use-webauthn' header depending on option (#48) --- lib/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/index.js b/lib/index.js index 74a8084..8de1722 100644 --- a/lib/index.js +++ b/lib/index.js @@ -59,6 +59,9 @@ const webAuth = (opener, opts, body) => { ...opts, method: 'POST', body, + headers: { + 'npm-use-webauthn': opts.authType === 'webauthn', + }, }).then(res => { return Promise.all([res, res.json()]) }).then(([res, content]) => {