SDKs / Client

Vue

Vue 3 Themeable Playground
@identrahq/vue

Drop-in Vue 3 components and composables — no SFC compiler required to consume them.

Install

pnpm add @identrahq/vue @identrahq/js

Wrap your app

html
<script setup lang="ts">
import { IdentraProvider, SignedIn, SignedOut, SignIn, UserButton } from "@identrahq/vue";
</script>

<template>
  <IdentraProvider :base-url="'https://api.identrahq.com'" :application-id="appId">
    <SignedOut><SignIn /></SignedOut>
    <SignedIn><UserButton /></SignedIn>
  </IdentraProvider>
</template>

Headless composable

`useIdentra()` returns reactive refs for `state` plus the `client`.

ts
import { useIdentra } from "@identrahq/vue";

const { state, client } = useIdentra();
// state.value.user / state.value.isSignedIn / state.value.isLoaded

Drop-in components

SignInSignUpUserButtonManageAccountSessionListSignedInSignedOutProtectVerifyEmail
Try these in the playground

API

IdentraProvideruseIdentra()