@riboth/vue
v0.1.0
Published
Vue 3 plugin, composable, and components for Riboth auth + wallet SDK.
Readme
@riboth/vue
Vue 3 plugin, composable, and components for the Riboth auth + wallet SDK.
Setup
// main.ts
import { createApp } from 'vue';
import { createRibothPlugin } from '@riboth/vue';
import App from './App.vue';
createApp(App)
.use(createRibothPlugin({
appId: 'app_xxx',
apiBaseUrl: 'https://api.yourriboth.example.com',
}))
.mount('#app');Composable
// In any component setup():
import { useRiboth } from '@riboth/vue';
const {
ready,
authenticated,
user,
login,
logout,
loginWithEmail,
verifyEmailCode,
loginWithGoogle,
loginWithPasskey,
linkEmail,
linkGoogle,
linkPasskey,
getWallets,
exportWalletKeystore,
exportPrivateKey,
client, // raw sdk-core client
} = useRiboth();Components
Both components are SFC-free (defined via render functions — no .vue compiler needed).
RibothLoginButton
<RibothLoginButton login-label="Sign in" @login="onLogin" @logout="onLogout" />RibothModal
<RibothModal :open="showModal" @close="showModal = false" @authenticated="onAuth" />Pre-created client
import { createRibothClient } from '@riboth/sdk-core';
const client = createRibothClient({ appId: '...', apiBaseUrl: '...' });
app.use(createRibothPlugin(client));