main.js 957 Bytes
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'

// Import the Auth0 configuration
import { domain, clientId } from "../auth_config.json"

// Import the plugin here
import { Auth0Plugin } from "./auth"
import Vuelidate from 'vuelidate'

Vue.use(Vuelidate)
    // Install the authentication plugin here
Vue.use(Auth0Plugin, {
    domain,
    clientId,
    redirect: false,
    onRedirectCallback: appState => {
        router.push(
            appState && appState.targetUrl ?
            appState.targetUrl :
            window.location.pathname
        );
    }
});

Vue.config.productionTip = false

axios.defaults.baseURL = process.env.APIurl

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>'
})