Prepend "Bearer"
This commit is contained in:
parent
fdb3fdb861
commit
69d5002cfd
|
@ -35,7 +35,7 @@ export async function login(
|
|||
|
||||
return {
|
||||
...user,
|
||||
jwt
|
||||
token: `Bearer ${jwt}`
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.log(error.message)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AuthResult } from './AuthResult'
|
||||
|
||||
export type LoginResult = AuthResult & {
|
||||
jwt?: string
|
||||
token?: string
|
||||
}
|
||||
|
|
|
@ -95,6 +95,8 @@ async function doLogin() {
|
|||
})
|
||||
|
||||
emit('login', loginResult)
|
||||
|
||||
console.log(loginResult)
|
||||
} catch (e: any) {
|
||||
console.log(e.message)
|
||||
error.value = e.message
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user