API reference
useThunderID()The
useThunderID composable provides access to the ThunderID authentication context in Vue applications. It allows you to retrieve authentication state, user information, and other context values managed by the .isSignedInbooleanWhether the user is currently signed in
isLoadingbooleanWhether an authentication operation is in progress
userUser \The authenticated user object, or `null` if not signed in
organizationOrganization \The current active organization
signIn(...args) => Promise<User \Initiates the sign-in flow
signOut(...args) => PromiseSigns the current user out
signUp(...args) => PromiseInitiates the sign-up flow
getAccessToken() => PromiseReturns the current access token
getDecodedIdToken() => PromiseReturns the decoded ID token payload
http{ request, requestAll }Authenticated HTTP client (see Accessing Protected APIs)
<script setup>
import { useThunderID } from '@thunderid/vue'
const { isSignedIn, user, signIn, signOut } = useThunderID()
</script>
<template>
<div>
<template v-if="isSignedIn">
<p>Welcome, {{ user?.name }}!</p>
<button @click="signOut()">Sign Out</button>
</template>
<template v-else>
<button @click="signIn()">Sign In</button>
</template>
</div>
</template>Get started
Provider, session, and a protected route, start to finish.
Connect your application
Getting started / Connect your application / Vue
The quickstart is maintained alongside the rest of the getting-started guides so it stays in step with the platform. This page covers the package itself.
Guides
Task-focused walkthroughs maintained alongside the SDK.