SDKs / Client

Vue

Vue 3 Themeable Playground
@identra/vue

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

Install

pnpm add @identra/vue @identra/js

Wrap your app

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

<template>
  <IdentraProvider :base-url="'http://localhost:8080'" :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 "@identra/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()