discord login
This commit is contained in:
@@ -1,9 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
|
||||
import goStore, { register, setReady } from "@/netcode";
|
||||
import goStore, { register, setReady, oauth2_register_discord } from "@/netcode";
|
||||
import { isStaticProperty } from "vue/compiler-sfc";
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
let username = ref<string>("legonzaur");
|
||||
|
||||
onMounted(() => {
|
||||
if (route.path != "/login") {
|
||||
return
|
||||
}
|
||||
const code = route.query.code
|
||||
if (!code) { return }
|
||||
if (Array.isArray(code)) { return }
|
||||
oauth2_register_discord(code)
|
||||
|
||||
history.pushState(
|
||||
{},
|
||||
'',
|
||||
'/'
|
||||
)
|
||||
})
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div id="game_status">
|
||||
|
||||
Reference in New Issue
Block a user