---
title: "usePasskeys"
description: "usePasskeys, auto-imported in the app: its options, return value and types."
canonical_url: "https://nuxt-backend.dev/docs/reference/api/use-passkeys"
---
# usePasskeys

## Interfaces

### Passkey

Defined in: [src/runtime/vue/composables/use-passkeys.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts)

A registered WebAuthn passkey (loose — the full shape is Better Auth's).

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="id">
        
      </a>
      
       <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name">
        
      </a>
      
       <code>
        name?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="devicetype">
        
      </a>
      
       <code>
        deviceType?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="backedup">
        
      </a>
      
       <code>
        backedUp?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="createdat">
        
      </a>
      
       <code>
        createdAt
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        Date
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsePasskeysOptions

Defined in: [src/runtime/vue/composables/use-passkeys.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts)

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="immediate">
        
      </a>
      
       <code>
        immediate?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Load the passkey list on mount. Default <code>
        true
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsePasskeysReturn

Defined in: [src/runtime/vue/composables/use-passkeys.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts)

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="passkeys">
        
      </a>
      
       <code>
        passkeys
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<a href="#passkey">
        <code>
          Passkey
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The user's passkeys — <code>
        undefined
      </code>
      
       until the first (client-only) load.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether a list load is in flight.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Message of the last failed call; cleared when the next call starts.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="refresh">
        
      </a>
      
       <code>
        refresh
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Reload the list.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="add">
        
      </a>
      
       <code>
        add
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Register a passkey on this device, then reload. Throws on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="rename">
        
      </a>
      
       <code>
        rename
      </code>
    </td>
    
    <td>
      (<code>
        id
      </code>
      
      , <code>
        name
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Rename a passkey, then reload. Throws on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="remove">
        
      </a>
      
       <code>
        remove
      </code>
    </td>
    
    <td>
      (<code>
        id
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Remove a passkey, then reload. Throws on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts" rel="nofollow">
        src/runtime/vue/composables/use-passkeys.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Functions

### usePasskeys()

```ts
function usePasskeys(options?): UsePasskeysReturn;
```

Defined in: [src/runtime/vue/composables/use-passkeys.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-passkeys.ts)

Passkey management over the Better Auth client — list, register, rename,
remove. Every method unwraps the client's `{ data, error }` envelope and
throws a plain `Error` on failure (mirrored into `error`), so callers use
ordinary try/catch. The list only loads in the browser (WebAuthn and the
session cookie live there), starting as `undefined` during SSR.

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#usepasskeysoptions">
        <code>
          UsePasskeysOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UsePasskeysReturn`](#usepasskeysreturn)


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
