Skip to content

Commit

Permalink
web/api/web_authentication_api: add missing closing tag (#38013)
Browse files Browse the repository at this point in the history
* web/api/web_authentication_api: add missing closing tag

* Update index.md

* Update files/en-us/web/api/web_authentication_api/index.md

* Update index.md

---------

Co-authored-by: Joshua Chen <[email protected]>
  • Loading branch information
islishude and Josh-Cena authored Feb 7, 2025
1 parent 262c13d commit ede91f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions files/en-us/web/api/web_authentication_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ The code below shows how you might use `getClientCapabilities()` to check if the
Note that the actual actions performed depend on your site.
For sites that _require_ biometric authentication, you might replace the login UI with a message indicating that biometric authentication is needed, and the user should try a different browser or device.

````js
async function checkisUserVerifyingPlatformAuthenticatorAvailable() {
```js
async function checkIsUserVerifyingPlatformAuthenticatorAvailable() {
const capabilities = await PublicKeyCredential.getClientCapabilities();
// Check the capability: userVerifyingPlatformAuthenticator
if (capabilities.userVerifyingPlatformAuthenticator) {
Expand All @@ -180,6 +180,7 @@ async function checkisUserVerifyingPlatformAuthenticatorAvailable() {
// Perform actions if biometric support is not available.
}
}
```

## Controlling access to the API

Expand All @@ -203,7 +204,7 @@ If you wish to allow access to a specific subdomain only, you could provide it l
```http
Permissions-Policy: publickey-credentials-get=("https://subdomain.example.com")
Permissions-Policy: publickey-credentials-create=("https://subdomain.example.com")
````
```

### Allowing embedded `create` and `get()` calls in an `<iframe>`

Expand Down

0 comments on commit ede91f0

Please sign in to comment.