mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Few fixes
This commit is contained in:
@@ -7,7 +7,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
FROM base as build
|
||||
|
||||
RUN apk add --update openssl librrd python3-dev libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \
|
||||
libressl-dev jpeg-dev rrdtool-dev file make gettext freetype-dev cairo-dev \
|
||||
libressl-dev jpeg-dev rrdtool-dev file make gettext freetype-dev cairo-dev cargo \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
WORKDIR /tmp
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<validation-observer ref="observer">
|
||||
<validation-provider
|
||||
v-slot="{ errors }"
|
||||
name="pin_code"
|
||||
rules="required|numeric|minmax:6"
|
||||
>
|
||||
<v-text-field
|
||||
@@ -95,6 +96,7 @@
|
||||
v-model="password"
|
||||
:error-messages="errors"
|
||||
outlined
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
</validation-provider>
|
||||
</validation-observer>
|
||||
@@ -179,13 +181,19 @@ export default {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
const resp = await account.finalizeTFASetup(this.pinCode)
|
||||
this.key = null
|
||||
this.qrURL = null
|
||||
this.tokens = resp.data.tokens
|
||||
Cookies.set('token', resp.data.access, { sameSite: 'strict' })
|
||||
Cookies.set('refreshToken', resp.data.refresh, { sameSite: 'strict' })
|
||||
this.$store.dispatch('auth/initialize')
|
||||
try {
|
||||
const resp = await account.finalizeTFASetup(this.pinCode)
|
||||
this.key = null
|
||||
this.qrURL = null
|
||||
this.tokens = resp.data.tokens
|
||||
Cookies.set('token', resp.data.access, { sameSite: 'strict' })
|
||||
Cookies.set('refreshToken', resp.data.refresh, { sameSite: 'strict' })
|
||||
this.$store.dispatch('auth/initialize')
|
||||
} catch (err) {
|
||||
if (err.response.status === 400) {
|
||||
this.$refs.observer.setErrors(err.response.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
async disableTFA () {
|
||||
const isValid = await this.$refs.observer.validate()
|
||||
|
||||
Reference in New Issue
Block a user