2FAuth/public/build/assets/Recover-DbJJtQCO.js.map
2024-11-27 12:03:02 +01:00

1 line
3.9 KiB
Plaintext

{"version":3,"file":"Recover-DbJJtQCO.js","sources":["../../../resources/js/views/auth/webauthn/Recover.vue"],"sourcesContent":["<script setup>\n import Form from '@/components/formElements/Form'\n import { useNotifyStore } from '@/stores/notify'\n\n const $2fauth = inject('2fauth')\n const notify = useNotifyStore()\n const router = useRouter()\n const route = useRoute()\n const showWebauthnForm = useStorage($2fauth.prefix + 'showWebauthnForm', false)\n \n const form = reactive(new Form({\n email : route.query.email,\n password : '',\n token: route.query.token,\n revokeAll: false,\n }))\n\n /**\n * Submits the recovery to the backend\n */\n function recover(e) {\n notify.clear()\n form.post('/webauthn/recover', {returnError: true})\n .then(response => {\n showWebauthnForm.value = false\n router.push({ name: 'login' })\n })\n .catch(error => {\n if ( error.response.status === 401 ) {\n notify.alert({ text: trans('auth.forms.authentication_failed'), duration:-1 })\n }\n else if (error.response.status === 422) {\n notify.alert({ text: error.response.data.message, duration:-1 })\n }\n else {\n notify.error(error)\n }\n })\n }\n\n onBeforeRouteLeave(() => {\n notify.clear()\n })\n</script>\n\n<template>\n <FormWrapper :title=\"$t('auth.webauthn.account_recovery')\" :punchline=\"$t('auth.webauthn.recover_account_instructions')\" >\n <div>\n <form @submit.prevent=\"recover\" @keydown=\"form.onKeydown($event)\">\n <FormCheckbox v-model=\"form.revokeAll\" fieldName=\"revokeAll\" label=\"auth.webauthn.disable_all_security_devices\" help=\"auth.webauthn.disable_all_security_devices_help\" />\n <FormPasswordField v-model=\"form.password\" fieldName=\"password\" :fieldError=\"form.errors.get('password')\" autocomplete=\"current-password\" :showRules=\"false\" label=\"auth.forms.current_password.label\" help=\"auth.forms.current_password.help\" />\n <div class=\"field\">\n <p>\n {{ $t('auth.forms.forgot_your_password') }}&nbsp;\n <RouterLink id=\"lnkResetPwd\" :to=\"{ name: 'password.request' }\" class=\"is-link\" :aria-label=\"$t('auth.forms.reset_your_password')\">\n {{ $t('auth.forms.request_password_reset') }}\n </RouterLink>\n </p>\n </div>\n <FormButtons\n :submitId=\"'btnRecover'\"\n :isBusy=\"form.isBusy\"\n :isDisabled=\"form.isDisabled\"\n :caption=\"$t('commons.continue')\"\n :showCancelButton=\"true\"\n cancelLandingView=\"login\" />\n </form>\n </div>\n <VueFooter />\n </FormWrapper>\n</template>\n"],"names":["$2fauth","inject","notify","useNotifyStore","router","useRouter","route","useRoute","showWebauthnForm","useStorage","form","reactive","Form","recover","e","response","error","trans","onBeforeRouteLeave"],"mappings":"mVAII,MAAMA,EAAUC,EAAO,QAAQ,EACzBC,EAASC,EAAc,EACvBC,EAASC,EAAS,EAClBC,EAAQC,EAAQ,EAChBC,EAAmBC,EAAWT,EAAQ,OAAS,mBAAoB,EAAK,EAExEU,EAAOC,EAAS,IAAIC,EAAK,CAC3B,MAAQN,EAAM,MAAM,MACpB,SAAW,GACX,MAAOA,EAAM,MAAM,MACnB,UAAW,EACnB,CAAK,CAAC,EAKF,SAASO,EAAQC,EAAG,CAChBZ,EAAO,MAAK,EACZQ,EAAK,KAAK,oBAAqB,CAAC,YAAa,EAAI,CAAC,EACjD,KAAKK,GAAY,CACdP,EAAiB,MAAQ,GACzBJ,EAAO,KAAK,CAAE,KAAM,OAAS,CAAA,CAChC,CAAA,EACA,MAAMY,GAAS,CACPA,EAAM,SAAS,SAAW,IAC3Bd,EAAO,MAAM,CAAE,KAAMe,EAAM,kCAAkC,EAAG,SAAS,EAAI,CAAA,EAExED,EAAM,SAAS,SAAW,IAC/Bd,EAAO,MAAM,CAAE,KAAMc,EAAM,SAAS,KAAK,QAAS,SAAS,EAAI,CAAA,EAG/Dd,EAAO,MAAMc,CAAK,CAEzB,CAAA,CACT,CAEI,OAAAE,EAAmB,IAAM,CACrBhB,EAAO,MAAK,CACf,CAAA"}