We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ea8e0e commit dfbe011Copy full SHA for dfbe011
resources/js/pages/auth/TwoFactorChallenge.vue
@@ -27,6 +27,8 @@
27
</template>
28
29
<script>
30
+import { mapActions } from 'pinia'
31
+import { useAuthStore } from '@/stores/auth.js'
32
import Logo from '@/components/Logo.vue'
33
34
export default {
@@ -40,13 +42,14 @@ export default {
40
42
Logo,
41
43
},
44
methods: {
45
+ ...mapActions(useAuthStore, ['attempt_user']),
46
login() {
47
this.errors = null
48
axios.post('/two-factor-challenge', { code: this.code, recovery_code: this.code })
49
.then((response) => {
50
if (response.status !== 204) return
51
- this.$store.dispatch('attempt_user')
52
+ this.attempt_user()
53
.then(() => {
54
this.$router.replace({ name: 'Home' })
55
})
0 commit comments