Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <template>
  2. <div class="login">
  3. <h3>Sign In</h3>
  4. <input type="text" placeholder="Email"><br>
  5. <input type="password" placeholder="Password"><br>
  6. <button @click="login"> Login </button>
  7. <p> <router-link to="/signup">Create One </router-link></p>
  8. </div>
  9. </template>
  10.  
  11. <script>
  12. import firebase from 'firebase';
  13. export default{
  14. name: 'login',
  15. data() {
  16. return {
  17. email: '',
  18. password: ''
  19. }
  20. },
  21. methods: {
  22. login: function() {
  23. firebase.auth().signInWithEmailAndPassword(this.email,this.password).then(
  24. function(user){
  25. alert('Connected')
  26. },
  27. function(err){
  28. alert(err.message)
  29. }
  30.  
  31. );
  32. }
  33. }
  34. }
  35. </script>
  36. /* new Vue({ el: '#container' }) */
  37.  
  38. <style scoped>
  39.  
  40. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement