1.0.8 • Published 3 years ago

dc-popup-auth v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

dc-popup-auth

dc-popup-auth is a simple and useful Discord Vuejs plugin.

ss

Discord Setup:

Developer Console Link: discord.com/developers/applications/you-bot-id/oauth2/general

Screen Shot

Main File:

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

import discord from 'dc-popup-auth'
import router from './router'

const app = createApp(App)

app.use(discord, {
    key: 'Your Discord Bot Secret Key',
    id: 'Your Discord Bot Application ID',
    router
})
app.use(router)
app.mount('#app')

Vue Template:

<template>

    <section >
        <login-button v-if="!user" :callback="callback" title="Login" />
        <div v-else >
            <logout-button title="Logout" @click="logout" />
            <span> {{ user.username }} </span>
        </div>
    </section>
    
</template>

Script:

<script setup>
    import { ref } from 'vue'

    const user = ref(null)

    const callback = (data) => {
        console.log(data)
        user.value = data
    }

    const logout = () => {
        user.value = null
    }

</script>
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago