moved to bootstrap-vue, there is a bug in vee-validate and bootstrap-vue >rc15
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<li v-for="(provider, index) in loginProviders" v-bind:id="index">
|
||||
<a :href="provider.url">{{ index }} ({{provider.type}})</a>
|
||||
</li>
|
||||
<li v-for="(provider, index) in loginProviders" v-bind:id="index">
|
||||
<a :href="provider.url">{{ index }} ({{provider.type}})</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Users</h3>
|
||||
<ul>
|
||||
<li v-for="(user) in users" >
|
||||
<li v-for="(user) in users">
|
||||
<a href="#">({{user.id}}) {{user.first_name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -50,10 +50,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { EventBus } from '@/utils'
|
||||
import {EventBus} from '@/utils';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
|
||||
data() {
|
||||
return {
|
||||
email: '',
|
||||
password: '',
|
||||
@@ -62,19 +63,20 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
authenticate () {
|
||||
this.$store.dispatch('login', { email: this.email, password: this.password })
|
||||
authenticate() {
|
||||
this.$store.dispatch('login', {email: this.email, password: this.password})
|
||||
.then(() => this.$router.push('/'));
|
||||
},
|
||||
register () {
|
||||
this.$store.dispatch('register', { email: this.email, password: this.password })
|
||||
register() {
|
||||
this.$store.dispatch('register', {email: this.email, password: this.password})
|
||||
.then(() => this.$router.push('/'));
|
||||
},
|
||||
oidc_login () {
|
||||
this.$store.dispatch('oidc_login', "\\oidc_login_redirection");
|
||||
oidc_login() {
|
||||
this.$store.dispatch('oidc_login', '\\oidc_login_redirection');
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
// this.$parent.$data.isLoading = true;
|
||||
EventBus.$on('failedRegistering', (msg) => {
|
||||
this.errorMsg = msg;
|
||||
});
|
||||
@@ -91,22 +93,22 @@
|
||||
this.$store.dispatch('loadLoginProviders');
|
||||
|
||||
// get tokens
|
||||
if(this.$cookies.isKey("tokens")){
|
||||
this.$store.dispatch('storeTokens', JSON.parse(atob(this.$cookies.get("tokens"))));
|
||||
this.$cookies.remove("tokens");
|
||||
if (this.$cookies.isKey('tokens')) {
|
||||
this.$store.dispatch('storeTokens', JSON.parse(atob(this.$cookies.get('tokens'))));
|
||||
this.$cookies.remove('tokens');
|
||||
}
|
||||
console.log(this.$cookies.keys());
|
||||
this.$log.debug(this.$cookies.keys());
|
||||
},
|
||||
beforeDestroy () {
|
||||
beforeDestroy() {
|
||||
EventBus.$off('failedRegistering');
|
||||
EventBus.$off('failedAuthentication');
|
||||
},
|
||||
computed: {
|
||||
users () {
|
||||
users() {
|
||||
return this.$store.state.users;
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user