0.0.13 • Published 2 months ago

@kmobi/vue v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

Vue 3 UI Component for the KodMobi Auth

Installation

NPM

npm install @kmobi/vue

Yarn

yarn add @kmobi/vue

Usage

Install plugin

App entrypoint (main.ts)

import {createApp} from 'vue'
import App from './App.vue'

import kodMobiPlugin from "@kmobi/vue"
import "@kmobi/vue/index.css"


createApp(App).use(kodMobiPlugin).mount('#app')

Use component

App.vue

<template>
  <div>
    <div>My awesome APP</div>
    <KodMobiAuth
      :base-url='baseUrl'
      :api-key='apiToken'
      @success='handleToken'
      <!-- Optional. Default: true. Is show screen with the success message. If false the loader will be shown -->
      :show-success-screen='true'
    />
  </div>
</template>

<script setup lang='ts'>
import {KodMobiAuth} from "@kmobi/vue";
import {ref} from "vue";

const token = ref<string>('')
const apiToken = "" // Your API token
const baseUrl = "https://api.kod.mobi" // KodMobi API base url

const handleToken = (tokenOBj: {token: string}) => {
  // Token for the Verify endpoint
  token.value = tokenOBj.token
}
</script>
0.0.13

2 months ago

0.0.10

9 months ago

0.0.11

9 months ago

0.0.12

9 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.5

11 months ago

0.0.7

10 months ago

0.0.6

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago