|
|
|
@ -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: { |
|
|
|
|