Browse Source

refactor(gui-v2): only pass token on signin

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
pull/2716/head
Braks 2 years ago committed by Pranav C
parent
commit
cada2707a3
  1. 2
      packages/nc-gui-v2/lib/types.ts
  2. 2
      packages/nc-gui-v2/pages/signin.vue

2
packages/nc-gui-v2/lib/types.ts

@ -21,7 +21,7 @@ export interface Getters {
export interface Actions {
signOut: () => void
signIn: (user: User, token: string) => void
signIn: (token: string) => void
}
export type GlobalState = Getters & Actions & ToRefs<State>

2
packages/nc-gui-v2/pages/signin.vue

@ -54,7 +54,7 @@ const signIn = async () => {
error = null
try {
const { token } = await $api.auth.signin(form)
$state.signIn({ email: form.email }, token!)
$state.signIn(token!)
} catch (e: any) {
// todo: errors should not expose what was wrong (i.e. do not show "Password is wrong" messages)
error = await extractSdkResponseErrorMsg(e)

Loading…
Cancel
Save