created basic auth system

This commit is contained in:
2023-04-23 17:16:53 +02:00
parent 70f18f75df
commit fa0a9b8e58
10 changed files with 360 additions and 15 deletions

View File

@@ -1,5 +1,13 @@
<template>
<div class="w-full h-screen bg-neutral-900 text-primary">
<a href="https://discord.com/api/oauth2/authorize?client_id=1052974736432443432&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth&response_type=code&scope=identify">Login with Discord</a>
<div class="w-full h-screen bg-neutral-900 text-primary whitespace-pre-wrap">
HOME SCREEN {{ user }}
</div>
</template>
<script setup>
definePageMeta({
middleware: ["auth"]
})
const user = useState('user')
</script>

5
web/pages/login.vue Normal file
View File

@@ -0,0 +1,5 @@
<template>
<div class="w-full h-screen bg-neutral-900 text-primary">
<a href="https://discord.com/api/oauth2/authorize?client_id=1052974736432443432&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth&response_type=code&scope=identify">Login with Discord</a>
</div>
</template>