Vue.js SDK for Asgardeo
The Asgardeo Vue SDK provides a streamlined way to integrate secure authentication and user management into your Vue.js applications. Built for Vue 3, it offers a comprehensive set of composables, components, and utilities to handle authentication flows, user profiles, and multi-tenancy features.
- Easy Integration: Simple setup with the
AsgardeoPluginand provider components - Composable API: Vue 3 composables for reactive authentication state management
- Pre-built Components: Ready-to-use components for sign-in, sign-up, user profiles, and more
- Multi-Tenancy Support: Built-in organization/workspace management capabilities
- Customizable UI: Primitive components and styling options for seamless integration
- International Support: Multi-language support with easy localization
- Type-Safe: Full TypeScript support for better developer experience
Get started with Asgardeo in your Vue application in minutes. Follow our Vue Quick Start Guide for step-by-step instructions on integrating authentication into your app.
# Using npm
npm install @asgardeo/vue
# Using pnpm
pnpm add @asgardeo/vue
# Using yarn
yarn add @asgardeo/vue<script setup lang="ts">
import { useUser } from '@asgardeo/vue'
const { user, isLoading } = useUser()
</script>
<template>
<div>
<p v-if="isLoading">Loading...</p>
<p v-else-if="user">Welcome, {{ user.username }}</p>
<p v-else>Not signed in</p>
</div>
</template>For complete API documentation including all components, composables, and customization options, see the Vue SDK Documentation.
useAsgardeo()- Main SDK client accessuseUser()- User profile and authentication stateuseOrganization()- Organization/workspace managementuseI18n()- InternationalizationuseTheme()- Theme customizationuseBranding()- Branding customizationuseFlow()- Authentication flow controluseFlowMeta()- Flow metadata access
SignedIn- Renders children only when user is authenticatedSignedOut- Renders children only when user is not authenticatedLoading- Renders children while authentication state is loadingUserComponent- Access user information with scoped slot patternOrganizationComponent- Access organization context with scoped slot pattern
SignInButton/BaseSignInButton- Sign-in button (styled and unstyled)SignOutButton/BaseSignOutButton- Sign-out button (styled and unstyled)SignUpButton/BaseSignUpButton- Sign-up button (styled and unstyled)
SignIn/BaseSignIn- Embedded sign-in formSignUp/BaseSignUp- Embedded sign-up formUserProfileComponent/BaseUserProfile- User profile displayUserDropdown/BaseUserDropdown- User menu dropdownOrganizationList/BaseOrganizationList- Organization listingOrganizationSwitcher/BaseOrganizationSwitcher- Organization switcherOrganizationProfile/BaseOrganizationProfile- Organization profileCreateOrganization/BaseCreateOrganization- Organization creation formAcceptInvite/BaseAcceptInvite- Invitation acceptanceInviteUser/BaseInviteUser- User invitation formLanguageSwitcher/BaseLanguageSwitcher- Language selection
Callback- Handle OAuth callback redirect
GoogleButton- Sign in with GoogleFacebookButton- Sign in with FacebookGitHubButton- Sign in with GitHubMicrosoftButton- Sign in with Microsoft
Button,Card,Alert,TextField,PasswordField,Select,Checkbox,DatePicker,OtpField,Typography,Divider,Logo,Spinner
createAsgardeoGuard- Vue Router navigation guard for protected routescreateCallbackRoute- Generate a callback route record for Vue RouterhandleWebAuthnAuthentication- WebAuthn/passkey supporthasAuthParamsInUrl- Detect OAuth parameters in URLnavigate- Programmatic navigation helperhttp- HTTP client with token management
Check out our example applications to see the Vue SDK in action:
- Vue SDK Playground - Example application
For support and questions:
We welcome contributions! Please see our Contributing Guidelines for more details.
Licenses this source under the Apache License, Version 2.0 LICENSE, You may not use this file except in compliance with the License.