Vue Components

Using the @verida/vue-account Vue componentsarrow-up-right

Verida supplies open source Vue components for easy app development. See the Verida Vue Components repoarrow-up-right for comprehensive documentation all options.

circle-info

This component can be customized to suite your application styles and themes. See the available propsarrow-up-right

circle-exclamation

Create a base vue project using the command below

 vue create myapp

install our Verida package.

yarn add  @verida/vue-account

The @verida/vue-account component library registration enables the vda-account and vda-login component to be accessed across your application.

main.js

import { createApp } from 'vue';
import App from './App.vue';
import Account from '@verida/vue-account';


const app = createApp(App);

app.use(Account);

app.mount('#app');
  • NOTE : You can retrieve the user application context from the parameter of the onConnected event emitter pass to the component .

This works for both the vda-login and vda-account

Using the vda-login componentarrow-up-right

This component is used to handle authentication via Verida Connect, it leverages our @verida/client-ts and @verida/account-web-vault packages under the hood.

Home.vue

Using the vda-account componentarrow-up-right

This component is used to display a logged in user's profile details such as name, did and avatar. If the user is not logged in, it will supply a login link and generate the single sign-on login form in the same way the vda-login component does.

  • Example code:

Login.vue

Last updated

Was this helpful?