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 { return {
...user, ...user,
jwt token: `Bearer ${jwt}`
} }
} catch (error: any) { } catch (error: any) {
console.log(error.message) console.log(error.message)

View File

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

View File

@ -95,6 +95,8 @@ async function doLogin() {
}) })
emit('login', loginResult) emit('login', loginResult)
console.log(loginResult)
} catch (e: any) { } catch (e: any) {
console.log(e.message) console.log(e.message)
error.value = 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 Logo from '../components/Logo.vue'
import LoggedCard from '../components/LoggedCard.vue' import LoggedCard from '../components/LoggedCard.vue'
import { ref } from 'vue' import { ref } from 'vue'
import { LoginResult } from '@/server/schemas/Auth' import { LoginResult } from '@/server/schemas/LoginResult'
const loginResult = ref<LoginResult | null>(null) const loginResult = ref<LoginResult | null>(null)