0.0.16 • Published 1 year ago

@kmobi/vue v0.0.16

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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
      :kmobiUrl='kmobiUrl'
      :customUrl='customUrl'
      :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 kmobiUrl = "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.14

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.13

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago