Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div class="login">
- <h3>Sign In</h3>
- <input type="text" placeholder="Email"><br>
- <input type="password" placeholder="Password"><br>
- <button @click="login"> Login </button>
- <p> <router-link to="/signup">Create One </router-link></p>
- </div>
- </template>
- <script>
- import firebase from 'firebase';
- export default{
- name: 'login',
- data() {
- return {
- email: '',
- password: ''
- }
- },
- methods: {
- login: function() {
- firebase.auth().signInWithEmailAndPassword(this.email,this.password).then(
- function(user){
- alert('Connected')
- },
- function(err){
- alert(err.message)
- }
- );
- }
- }
- }
- </script>
- /* new Vue({ el: '#container' }) */
- <style scoped>
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement