mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-11 20:36:53 +08:00
Merge pull request #363 from Ponkhy/2fa
Added simple TOTP Two Factor Authentication
This commit is contained in:
@@ -120,6 +120,14 @@
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<h2 class="mt-5 mb-2">
|
||||
{{ $t("Two Factor Authentication") }}
|
||||
</h2>
|
||||
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-primary me-2" type="button" @click="$refs.TwoFADialog.show()">{{ $t("2FA Settings") }}</button>
|
||||
</div>
|
||||
|
||||
<h2 class="mt-5 mb-2">{{ $t("Import/Export Backup") }}</h2>
|
||||
|
||||
<p>
|
||||
@@ -186,6 +194,7 @@
|
||||
</footer>
|
||||
|
||||
<NotificationDialog ref="notificationDialog" />
|
||||
<TwoFADialog ref="TwoFADialog" />
|
||||
|
||||
<Confirm ref="confirmDisableAuth" btn-style="btn-danger" :yes-text="$t('I understand, please disable')" :no-text="$t('Leave')" @yes="disableAuth">
|
||||
<template v-if="$i18n.locale === 'es-ES' ">
|
||||
@@ -269,6 +278,7 @@ import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import timezone from "dayjs/plugin/timezone"
|
||||
import NotificationDialog from "../components/NotificationDialog.vue";
|
||||
import TwoFADialog from "../components/TwoFADialog.vue";
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
|
||||
@@ -279,6 +289,7 @@ const toast = useToast()
|
||||
export default {
|
||||
components: {
|
||||
NotificationDialog,
|
||||
TwoFADialog,
|
||||
Confirm,
|
||||
},
|
||||
data() {
|
||||
|
@@ -87,7 +87,7 @@ export default {
|
||||
if (res.ok) {
|
||||
this.processing = true;
|
||||
|
||||
this.$root.login(this.username, this.password, (res) => {
|
||||
this.$root.login(this.username, this.password, "", (res) => {
|
||||
this.processing = false;
|
||||
this.$router.push("/")
|
||||
})
|
||||
|
Reference in New Issue
Block a user