Browse Source

Login check

master
Joshua Rubingh 8 months ago
parent
commit
0b615ad283
  1. 14
      pages/login.vue

14
pages/login.vue

@ -6,12 +6,16 @@ @@ -6,12 +6,16 @@
export default {
layout: 'landing',
mounted() {
this.$axios.get('/api/v1/researchers/me/').then((response) => {
this.$auth.setUser(response.data)
this.$auth.loginWith('cookie').catch(() => {
window.location.href = `https://api-vre.web.rug.nl/auth/login/?next=${location.origin}${this.$auth.$state.redirect}`
this.$axios
.get('/api/v1/researchers/me/')
.then((response) => {
this.$auth.setUser(response.data)
})
.catch(() => {
this.$auth.loginWith('cookie').catch(() => {
window.location.href = `https://api-vre.web.rug.nl/auth/login/?next=${location.origin}${this.$auth.$state.redirect}`
})
})
})
// this.$auth.login({
// data: {

Loading…
Cancel
Save