OASIS Avatar SSO SDK - Svelte

Complete Svelte integration for OASIS Avatar Single Sign-On authentication with stores.

Installation

npm install @oasis/avatar-sso-svelte

Quick 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