mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 08:52:15 +00:00
create Socialite Login/Register
This commit is contained in:
33
resources/js/views/Auth/SocialiteCallback.vue
Normal file
33
resources/js/views/Auth/SocialiteCallback.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div>
|
||||
<Spinner/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Spinner from '/resources/js/components/FilesView/Spinner'
|
||||
|
||||
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) => {
|
||||
|
||||
this.$isSomethingWrong()
|
||||
|
||||
this.$router.push({name: 'Homepage'})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user