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