feat: basic oauth
This commit is contained in:
parent
72b13f5265
commit
7ab17001f0
16 changed files with 199 additions and 106 deletions
32
pages/login/index.vue
Normal file
32
pages/login/index.vue
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<script setup lang="ts">
|
||||
const { server, token } = useAppCookies()
|
||||
|
||||
async function oauth() {
|
||||
const a = document.createElement('a')
|
||||
a.href = `/api/${server.value}/login`
|
||||
a.target = '_blank'
|
||||
a.click()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div p4>
|
||||
<button @click="oauth()">
|
||||
OAuth
|
||||
</button>
|
||||
<input
|
||||
v-model="server"
|
||||
placeholder="Server URL"
|
||||
bg-transparent text-current
|
||||
border="~ border" p="x2 y1" w-full
|
||||
outline-none
|
||||
>
|
||||
<input
|
||||
v-model="token"
|
||||
placeholder="Token"
|
||||
bg-transparent text-current
|
||||
border="~ border" p="x2 y1" w-full
|
||||
outline-none
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue