@illinois-grad/vue-auth
v2.1.16
Published
Vue 3 authentication utilities with MSAL integration for Graduate College applications
Downloads
1,146
Maintainers
Readme
@illinois-grad/vue-auth
Vue 3 authentication utilities with MSAL (Microsoft Authentication Library) integration for Graduate College applications.
Features
- MSAL Integration - Complete Entra/Microsoft authentication support
- Reactive - Built with Vue 3 Composition API
- Router Guards - Protect routes with authentication
- User Utilities - Helper functions for user display and avatars
- Type Safe - Written in TypeScript with full type definitions
Installation
npm install @illinois-grad/vue-authPeer Dependencies
This package requires the following peer dependencies:
{
"@azure/msal-browser": "^5.0.0",
"pinia": "^3.0.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0"
}When upgrading from MSAL Browser v4, note that request-level logout redirect hooks are no longer supported. If you need to intercept redirect navigation in v5, provide auth.onRedirectNavigate on the top-level MSAL config instead.
When calling code needs a manual recovery path for corrupted local auth state, call auth.clearCacheAndLoginRedirect(). It clears the local MSAL cache, resets the cached account state, and starts a fresh login redirect.
To decide when to show that recovery action, use auth.manualRecoveryRequired or msalStore.manualRecoveryRequired. They check whether the current auth error indicates corrupted local auth state rather than an automatically recoverable redirect flow.
