removed SocialiteCallback.vue

This commit is contained in:
Čarodej
2022-03-05 11:35:17 +01:00
parent e0e488860d
commit 5829eaacc4
6 changed files with 7 additions and 49 deletions
+2 -10
View File
@@ -1,17 +1,9 @@
const routesAuth = [
{
name: 'SocialiteCallback',
path: '/socialite/:provider/callback',
component: () => import(/* webpackChunkName: "chunks/email-verified" */ '../views/Auth/SocialiteCallback'),
meta: {
requiresAuth: false,
},
},
{
name: 'SuccessfullyVerified',
path: '/successfully-verified',
component: () =>
import(/* webpackChunkName: "chunks/email-verified" */ '../views/Auth/SuccessfullyEmailVerified'),
import(/* webpackChunkName: "chunks/successfully-email-verified" */ '../views/Auth/SuccessfullyEmailVerified'),
meta: {
requiresAuth: false,
},
@@ -19,7 +11,7 @@ const routesAuth = [
{
name: 'SuccessfullySend',
path: '/successfully-send',
component: () => import(/* webpackChunkName: "chunks/email-verified" */ '../views/Auth/SuccessfullySendEmail'),
component: () => import(/* webpackChunkName: "chunks/successfully-email-send" */ '../views/Auth/SuccessfullySendEmail'),
meta: {
requiresAuth: false,
},
@@ -1,37 +0,0 @@
<template>
<Spinner />
</template>
<script>
import Spinner from '../../components/FilesView/Spinner'
import { events } from '../../bus'
export default {
name: 'SocialiteCallback',
components: {
Spinner,
},
created() {
axios
.get(`/api${this.$route.fullPath}`)
.then(() => {
// Set login state
this.$store.commit('SET_AUTHORIZED', true)
// Go to files page
this.$router.push({ name: 'Files' })
})
.catch((error) => {
if (error.response.status === 401) {
events.$emit('alert:open', {
title: error.response.data.message,
})
} else {
this.$isSomethingWrong()
}
this.$router.push({ name: 'SignIn' })
})
},
}
</script>