now getting login providers from backend

This commit is contained in:
2019-04-02 10:45:45 +02:00
parent 1ee42cb01b
commit c0b53decc2
3 changed files with 30 additions and 6 deletions

View File

@@ -8,6 +8,11 @@
<p class="subtitle error-msg">{{ errorMsg }}</p>
</div>
</div>
<ul>
<li v-for="(provider, index) in loginProviders" v-bind:id="index">
<a :href="provider.url">{{ index }} ({{provider.type}})</a>
</li>
</ul>
</section>
<section class="section">
<div class="container">
@@ -44,6 +49,7 @@
email: '',
password: '',
errorMsg: '',
loginProviders: [],
};
},
methods: {
@@ -58,11 +64,15 @@
},
mounted () {
EventBus.$on('failedRegistering', (msg) => {
this.errorMsg = msg
this.errorMsg = msg;
});
EventBus.$on('failedAuthentication', (msg) => {
this.errorMsg = msg
this.errorMsg = msg;
});
EventBus.$on('loginProvidersLoaded', (providers) => {
this.loginProviders = providers;
});
this.$store.dispatch('loadLoginProviders');
},
beforeDestroy () {
EventBus.$off('failedRegistering');