Prepend "Bearer"

This commit is contained in:
Douglas Barone 2023-10-25 12:51:08 -04:00
parent fdb3fdb861
commit 69d5002cfd
4 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ export async function login(
return {
...user,
jwt
token: `Bearer ${jwt}`
}
} catch (error: any) {
console.log(error.message)

View File

@ -1,5 +1,5 @@
import { AuthResult } from './AuthResult'
export type LoginResult = AuthResult & {
jwt?: string
token?: string
}

View File

@ -95,6 +95,8 @@ async function doLogin() {
})
emit('login', loginResult)
console.log(loginResult)
} catch (e: any) {
console.log(e.message)
error.value = e.message

View File

@ -18,7 +18,7 @@ import IpAlert from '../components/IpAlert.vue'
import Logo from '../components/Logo.vue'
import LoggedCard from '../components/LoggedCard.vue'
import { ref } from 'vue'
import { LoginResult } from '@/server/schemas/Auth'
import { LoginResult } from '@/server/schemas/LoginResult'
const loginResult = ref<LoginResult | null>(null)