> For the complete documentation index, see [llms.txt](/llms.txt).

# useAuthTokenInfo

Composable to retrieve and manage the identity token from Embedded Wallets in Vue.

### Import

```ts
import { useAuthTokenInfo } from '@web3auth/modal/vue'

```

### Usage

```html
<script setup lang="ts">
  import { useAuthTokenInfo } from '@web3auth/modal/vue'

  const { getAuthTokenInfo, loading, error, token } = useAuthTokenInfo()
</script>

<template>
  <div>
    <button @click="getAuthTokenInfo" :disabled="loading">
      {{ loading ? "Authenticating..." : "Get Identity Token" }}
    </button>
    <div v-if="token">Token: {{ token }}</div>
    <div v-if="error">Error: {{ error.message }}</div>
  </div>
</template>

```

### Return type

```ts
import type { IUseAuthTokenInfo } from '@web3auth/modal/vue'

```

#### `loading`

`Ref<boolean>`

Whether the authentication process is in progress.

#### `error`

`Ref<Web3AuthError | null>`

Error that occurred during the authentication process.

#### `token`

`Ref<string | null>`

The identity token returned after successful authentication.

#### `getAuthTokenInfo`

`() => Promise<string | null>`

Function to initiate the authentication process and retrieve the identity token.
