Vue
Vue 3 Themeable Playground@identrahq/vueDrop-in Vue 3 components and composables — no SFC compiler required to consume them.
Install
pnpm add @identrahq/vue @identrahq/jsWrap 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.isLoadedDrop-in components
SignInSignUpUserButtonManageAccountSessionListSignedInSignedOutProtectVerifyEmail
Try these in the playgroundAPI
IdentraProvideruseIdentra()