---
title: "useAccessPhase · useInvite · useAccessAdmin · useMemberTicket"
description: "useAccessPhase · useInvite · useAccessAdmin · useMemberTicket, auto-imported in the app: its options, return value and types."
canonical_url: "https://nuxt-backend.dev/docs/reference/api/use-access"
---
# useAccessPhase · useInvite · useAccessAdmin · useMemberTicket

Version: nuxt-backend 0.6.x · Tab: Reference · Kind: reference · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

## Interfaces

### AccessApiRefs

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

The functions re-exported from your `backend/access.ts`.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="getaccessphase">
        
      </a>
      
       <code>
        getAccessPhase?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "query"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        never
      </code>
      
      >, <a href="https://nuxt-backend.dev/docs/reference/api/access#accessphasestate">
        <code>
          AccessPhaseState
        </code>
      </a>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="checkinvite">
        
      </a>
      
       <code>
        checkInvite?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        code
      </code>
      
      : <code>
        string
      </code>
      
      ; }, { <code>
        status
      </code>
      
      : <a href="#invitestatus">
        <code>
          InviteStatus
        </code>
      </a>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getaccessconsole">
        
      </a>
      
       <code>
        getAccessConsole?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "query"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        never
      </code>
      
      >, | <a href="https://nuxt-backend.dev/docs/reference/api/access#accessconsole">
        <code>
          AccessConsole
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="setaccessphase">
        
      </a>
      
       <code>
        setAccessPhase?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        phase
      </code>
      
      : <a href="#accessphase">
        <code>
          AccessPhase
        </code>
      </a>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="createinvite">
        
      </a>
      
       <code>
        createInvite?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        kind
      </code>
      
      : <a href="#invitekind">
        <code>
          InviteKind
        </code>
      </a>
      
      ; <code>
        label
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        maxUses
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        expiresAt?
      </code>
      
      : <code>
        number
      </code>
      
      ; }, { <code>
        id
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        code
      </code>
      
      : <code>
        string
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="revokeinvite">
        
      </a>
      
       <code>
        revokeInvite?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        id
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="admitemails">
        
      </a>
      
       <code>
        admitEmails?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        emails
      </code>
      
      : <code>
        string
      </code>
      
      <span>
        
      </span>
      
      ; <code>
        label?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        email?
      </code>
      
      : <code>
        boolean
      </code>
      
      ; }, <a href="https://nuxt-backend.dev/docs/reference/api/access#admitresult">
        <code>
          AdmitResult
        </code>
      </a>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getmemberticket">
        
      </a>
      
       <code>
        getMemberTicket?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "query"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        never
      </code>
      
      >, | <a href="https://nuxt-backend.dev/docs/reference/api/access#memberticket">
        <code>
          MemberTicket
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="issuememberticket">
        
      </a>
      
       <code>
        issueMemberTicket?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "mutation"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        never
      </code>
      
      >, <a href="https://nuxt-backend.dev/docs/reference/api/access#memberticket">
        <code>
          MemberTicket
        </code>
      </a>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseAccessPhaseOptions

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="api">
        
      </a>
      
       <code>
        api?
      </code>
    </td>
    
    <td>
      <a href="#accessapirefs">
        <code>
          AccessApiRefs
        </code>
      </a>
    </td>
    
    <td>
      Override the injected <code>
        api.access
      </code>
      
       namespace.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseAccessPhaseReturn

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="phase">
        
      </a>
      
       <code>
        phase
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#accessphase">
        <code>
          AccessPhase
        </code>
      </a>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The app's launch phase, live: <code>
        'early-access'
      </code>
      
      , <code>
        'invite-only'
      </code>
      
       or <code>
        'public'
      </code>
      
      . <code>
        'public'
      </code>
      
       for an app without <code>
        backend/access.ts
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispublic">
        
      </a>
      
       <code>
        isPublic
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       once the app is public: anyone signs up.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       until the phase is first read.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/functions#backenderror">
        <code>
          BackendError
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Why the phase could not be read, else <code>
        null
      </code>
      
      . The read never throws.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseInviteOptions

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="api-1">
        
      </a>
      
       <code>
        api?
      </code>
    </td>
    
    <td>
      <a href="#accessapirefs">
        <code>
          AccessApiRefs
        </code>
      </a>
    </td>
    
    <td>
      Override the injected <code>
        api.access
      </code>
      
       namespace.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="fromaddress">
        
      </a>
      
       <code>
        fromAddress?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Open the access link the page was reached by (default <code>
        false
      </code>
      
      ), for the page an access link opens: <code>
        /invite
      </code>
      
      , or an app's own page there. Once the page mounts, the token leaves the address's fragment (<code>
        #<token>
      </code>
      
      ) at once and the tab keeps it, so a reload while the session settles still has it. Once the session settles, a signed-in visitor's is forgotten, as there is no sign-up to hand it to, and anyone else's, or the one the tab kept, is checked. <code>
        linkChecked
      </code>
      
       says when that is done.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseInviteReturn

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="check">
        
      </a>
      
       <code>
        check
      </code>
    </td>
    
    <td>
      (<code>
        codeOrToken?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<a href="#invitestatus">
        <code>
          InviteStatus
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Check an invite code or an access link's token, and keep it for this tab while it is valid, so the next sign-in carries it. With no argument, it reads an access link's token from the address's fragment (<code>
        /invite#<token>
      </code>
      
      ) and strips it from the address, or checks the one this tab keeps. Never rejects: a failed check is in <code>
        error
      </code>
      
      , and keeps the code for the next try; only an answer that it admits nobody drops it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="status">
        
      </a>
      
       <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<a href="#invitestatus">
        <code>
          InviteStatus
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      How the last check came out: <code>
        valid
      </code>
      
      , <code>
        expired
      </code>
      
      , <code>
        used-up
      </code>
      
      , <code>
        revoked
      </code>
      
       or <code>
        unknown
      </code>
      
      ; <code>
        null
      </code>
      
       before one.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispending">
        
      </a>
      
       <code>
        isPending
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while a check runs.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error-1">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/functions#backenderror">
        <code>
          BackendError
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Why the last check failed (a rate limit, say), else <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="iskept">
        
      </a>
      
       <code>
        isKept
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether this tab keeps a valid code or token for its next sign-in.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="forget">
        
      </a>
      
       <code>
        forget
      </code>
    </td>
    
    <td>
      () => <code>
        void
      </code>
    </td>
    
    <td>
      Drop the kept code or token.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="linkchecked">
        
      </a>
      
       <code>
        linkChecked
      </code>
    </td>
    
    <td>
      <code>
        Readonly
      </code>
      
      <<code>
        Ref
      </code>
      
      <<code>
        boolean
      </code>
      
      >>
    </td>
    
    <td>
      <code>
        true
      </code>
      
       once the access link has been opened: with <code>
        fromAddress
      </code>
      
      , once the page mounted and the session settled (the server cannot read the fragment); from the start without it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="asked">
        
      </a>
      
       <code>
        asked
      </code>
    </td>
    
    <td>
      <code>
        Readonly
      </code>
      
      <<code>
        Ref
      </code>
      
      <<code>
        boolean
      </code>
      
      >>
    </td>
    
    <td>
      Whether a ticket was asked about at all: a link brought one, the tab kept one, or a code was checked.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="referral">
        
      </a>
      
       <code>
        referral
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      The referral code the address carries, <code>
        /invite?ref=<code>
      </code>
      
      : the referral page links here with it for a visitor who holds an invite while the app is closed. <code>
        null
      </code>
      
       without one, or with no referral page to go back to. It claims nothing by itself.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="signinto">
        
      </a>
      
       <code>
        signInTo
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Where the way on to sign in goes: the sign-in page, which hands the kept code over; with a <code>
        referral
      </code>
      
      , returning to that referral page, where the person claims it with its button once signed in. A member's ticket of <code>
        memberTickets({ referrals })
      </code>
      
       has claimed the friend for its member by then, whatever the address says. <code>
        null
      </code>
      
       with the sign-in page turned off.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseAccessAdminOptions

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="api-2">
        
      </a>
      
       <code>
        api?
      </code>
    </td>
    
    <td>
      <a href="#accessapirefs">
        <code>
          AccessApiRefs
        </code>
      </a>
    </td>
    
    <td>
      Override the injected <code>
        api.access
      </code>
      
       namespace.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseAccessAdminReturn

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="console">
        
      </a>
      
       <code>
        console
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/access#accessconsole">
        <code>
          AccessConsole
        </code>
      </a>
      
       | <code>
        null
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The Access tab's data, live: the phase, the codes and links, the member tickets, the invitations by address. <code>
        null
      </code>
      
       for a caller who is no administrator, <code>
        undefined
      </code>
      
       while it is read.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading-1">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while it is first read.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isrefused">
        
      </a>
      
       <code>
        isRefused
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       once the read answered that this caller is no administrator.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispending-1">
        
      </a>
      
       <code>
        isPending
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while a change is saved.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error-2">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/functions#backenderror">
        <code>
          BackendError
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Why the last change failed, else why the read failed, else <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="setphase">
        
      </a>
      
       <code>
        setPhase
      </code>
    </td>
    
    <td>
      (<code>
        phase
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Move the app to a phase. Takes a recent sign-in. Rejects on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="createinvite-1">
        
      </a>
      
       <code>
        createInvite
      </code>
    </td>
    
    <td>
      (<code>
        input
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <{ <code>
        id
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        code
      </code>
      
      : <code>
        string
      </code>
      
      ; }>
    </td>
    
    <td>
      Make a code or a link and answer it, once. Takes a recent sign-in. Rejects on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="revoke">
        
      </a>
      
       <code>
        revoke
      </code>
    </td>
    
    <td>
      (<code>
        id
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Close a code, a link or a member's ticket, or delete an unused invitation by address. Takes a recent sign-in. Rejects on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="admit">
        
      </a>
      
       <code>
        admit
      </code>
    </td>
    
    <td>
      (<code>
        emails
      </code>
      
      , <code>
        label?
      </code>
      
      , <code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/access#admitresult">
        <code>
          AdmitResult
        </code>
      </a>
      
      >
    </td>
    
    <td>
      Invite addresses: with no email, unless <code>
        email
      </code>
      
       asks for one ("Email them", about a hundred an hour). Takes a recent sign-in. Rejects on failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseMemberTicketOptions

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="api-3">
        
      </a>
      
       <code>
        api?
      </code>
    </td>
    
    <td>
      <a href="#accessapirefs">
        <code>
          AccessApiRefs
        </code>
      </a>
    </td>
    
    <td>
      Override the injected <code>
        api.access
      </code>
      
       namespace.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseMemberTicketReturn

Defined in: [src/runtime/vue/composables/use-access.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.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="ticket">
        
      </a>
      
       <code>
        ticket
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/access#memberticket">
        <code>
          MemberTicket
        </code>
      </a>
      
       | <code>
        null
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The signed-in member's ticket, live: <code>
        open
      </code>
      
       once the app is public, <code>
        off
      </code>
      
       while the program is, <code>
        none
      </code>
      
       until they ask for one, then <code>
        issued
      </code>
      
       with its token, its uses, the ones left and its end. <code>
        null
      </code>
      
       signed out, <code>
        undefined
      </code>
      
       while it is read.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="link">
        
      </a>
      
       <code>
        link
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      The link to share once issued, <code>
        <origin>/invite#<token>
      </code>
      
       on the page's own origin (on the server, the request's own host, never a forwarded one) and the <code>
        invite
      </code>
      
       page's path, else <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="issue">
        
      </a>
      
       <code>
        issue
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/access#memberticket">
        <code>
          MemberTicket
        </code>
      </a>
      
      >
    </td>
    
    <td>
      Mint the member's ticket, or answer the one they hold. Rejects on failure, which <code>
        error
      </code>
      
       holds too.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading-2">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while the ticket is first read.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispending-2">
        
      </a>
      
       <code>
        isPending
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while <code>
        issue
      </code>
      
       runs.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error-3">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/functions#backenderror">
        <code>
          BackendError
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Why the last <code>
        issue
      </code>
      
       failed, else why the read failed, else <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-access.ts" rel="nofollow">
        src/runtime/vue/composables/use-access.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Type Aliases

### AccessPhase

```ts
type AccessPhase = "early-access" | "invite-only" | "public";
```

Defined in: [src/convex/access-tickets.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/access-tickets.ts)

A launch phase, in the order an app goes through them.

---

### InviteStatus

```ts
type InviteStatus = "valid" | "expired" | "used-up" | "revoked" | "unknown";
```

Defined in: [src/convex/access-tickets.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/access-tickets.ts)

How an invite code or an access link checks: `valid`, or why it admits nobody.

---

### InviteKind

```ts
type InviteKind = "code" | "link";
```

Defined in: [src/convex/access-tickets.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/access-tickets.ts)

The two kinds of shareable ticket: a code a person types, a link a person opens.

## Functions

### useAccessPhase()

```ts
function useAccessPhase(options?): UseAccessPhaseReturn;
```

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

The app's launch phase, so a page offers what a visitor can do now: join
the waitlist in early access, bring an invite code while invite only,
sign up once public. Rendered on the server, so the page never flashes
the open version before the closed one, and live after.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#useaccessphaseoptions">
        <code>
          UseAccessPhaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UseAccessPhaseReturn`](#useaccessphasereturn)

#### Example

```vue
<script setup lang="ts">
const { phase } = useAccessPhase()
</script>
<template>
  <NuxtLink v-if="phase === 'invite-only'" to="/login">I have an invite</NuxtLink>
</template>
```

---

### useInvite()

```ts
function useInvite(options?): UseInviteReturn;
```

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

Redeem an invite code or an access link on a page of your own: check it
before anyone signs in, and keep it for the tab so the sign-in hands it
over with the code. The account's creation checks it again and counts
the use. The packaged `/invite` page is built on it.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#useinviteoptions">
        <code>
          UseInviteOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UseInviteReturn`](#useinvitereturn)

#### Example

```vue
<script setup lang="ts">
const { check, status } = useInvite()
const code = ref('')
</script>
<template>
  <form @submit.prevent="check(code)"><input v-model="code"></form>
  <NuxtLink v-if="status === 'valid'" to="/login">Continue to sign in</NuxtLink>
</template>
```

---

### useAccessAdmin()

```ts
function useAccessAdmin(options?): UseAccessAdminReturn;
```

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

The admin console's Access tab, as data: the launch phase and its
change, the invite codes and access links, the member tickets, and
the invitations by address, through `backend/access.ts`. Every change is an
administrator's in person and takes a recent sign-in
(`useReauthentication().withReauthentication` asks for one).

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#useaccessadminoptions">
        <code>
          UseAccessAdminOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UseAccessAdminReturn`](#useaccessadminreturn)

---

### useMemberTicket()

```ts
function useMemberTicket(options?): UseMemberTicketReturn;
```

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

A member's ticket (`access.memberTickets`), on markup of your own: the
access link a member shares while the app is closed, admitting a few
friends past the waitlist. `issue` mints it the first time and answers
the same one after, until it expires. The token rides in the link's
fragment, out of every server's logs, and the packaged `/invite` page
redeems it. With `memberTickets({ referrals })`, each friend it admits
counts as the member's referral from the moment their account is made.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#usememberticketoptions">
        <code>
          UseMemberTicketOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UseMemberTicketReturn`](#usememberticketreturn)

#### Example

```vue
<script setup lang="ts">
const { ticket, link, issue } = useMemberTicket()
</script>
<template>
  <button v-if="ticket?.state === 'none'" @click="issue()">Get my ticket</button>
  <p v-else-if="ticket?.state === 'issued'">{{ ticket.left }} of {{ ticket.uses }} left: {{ link }}</p>
</template>
```

## References

### AccessConsole

Re-exports [AccessConsole](https://nuxt-backend.dev/docs/reference/api/access#accessconsole)

---

### AccessPhaseState

Re-exports [AccessPhaseState](https://nuxt-backend.dev/docs/reference/api/access#accessphasestate)

---

### AdmitResult

Re-exports [AdmitResult](https://nuxt-backend.dev/docs/reference/api/access#admitresult)

---

### MemberTicket

Re-exports [MemberTicket](https://nuxt-backend.dev/docs/reference/api/access#memberticket)


## Sitemap

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