OASIS Avatar SSO SDK - Svelte
Complete Svelte integration for OASIS Avatar Single Sign-On authentication with stores.
Installation
npm install @oasis/avatar-sso-svelteQuick Start
1. Initialize in App
<!-- App.svelte -->
<script>
import { onMount } from 'svelte';
import { initOasisSSO } from '@oasis/avatar-sso-svelte';
onMount(() => {
initOasisSSO({
apiUrl: 'https://api.oasis.network',
provider: 'Auto'
});
});
</script>
<slot />2. Use in Components
3. Protected Routes
Features
✨ Svelte Stores - Reactive stores for auth state 🎯 Auto-subscriptions - Automatic reactivity 🚀 TypeScript - Full type safety 🔄 SSR Support - Works with SvelteKit 🎨 Components - Pre-built Svelte components
API Reference
Stores
All stores are readable and auto-updating:
Methods
Initialization
Pre-built Components
OasisLoginForm
OasisAvatarDisplay
SvelteKit Integration
License
MIT © OASIS Team
Last updated