@aws-amplify/auth
Version:
Auth category of aws-amplify
1 lines • 900 B
Source Map (JSON)
{"version":3,"file":"getIsPasskeySupported.mjs","sources":["../../../../../src/client/utils/passkey/getIsPasskeySupported.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isBrowser } from '@aws-amplify/core/internals/utils';\n/**\n * Determines if passkey is supported in current context\n * Will return false if executed in non-secure context\n * @returns boolean\n */\nexport const getIsPasskeySupported = () => {\n return (isBrowser() &&\n window.isSecureContext &&\n 'credentials' in navigator &&\n typeof window.PublicKeyCredential === 'function');\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG,MAAM;AAC3C,IAAI,QAAQ,SAAS,EAAE;AACvB,QAAQ,MAAM,CAAC,eAAe;AAC9B,QAAQ,aAAa,IAAI,SAAS;AAClC,QAAQ,OAAO,MAAM,CAAC,mBAAmB,KAAK,UAAU;AACxD;;;;"}