title: Spring boot and vueJs authentication with firebase
body: <p>I am trying to implement authentication spring boot in backend and vue Js in front end, the problem is that I have ly backkend connected readonly to a database, so used authentication using vue js and <a href="https://firebase.google.com/products/auth/" rel="nofollow noreferrer">firebase authentication</a> feature.</p>
  
  <h2> <strong>The problem is that my endpoints still accessible and anyone can send requests and fetch data using postman for example</strong> !</h2>
  
  <p>If anyone has an idea how to resolve that please go ahead, thanks !</p>
  
  <p>PS: i don't think that i may help, but here is my login code anyway, @Renaud Tarnec </p>
  
  <pre><code>import firebase from 'firebase'
  
  export default {
    name: 'login',
    data: function() {
      return {
        email: '',
        password: ''
      }
    },
    methods: {
      signIn: function() {
        firebase.auth().signInWithEmailAndPassword(this.email, this.password).then(
          function(user) {
            alert('You are connected')
          },
          function(err) {
            aler('Ooops,' + err.message)
          }
        );
      }
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and here is for example a part of my repo and there is list of events :</p>
  
  <pre><code>@RequestMapping("api/events")
  public class EventController {
      @Autowired
      private EventRepository eventrepository;
  
      @GetMapping
      public ArrayList&lt;Event&gt; find() {
          ArrayList&lt;Event&gt; events = new ArrayList&lt;Event&gt;();
          for (Event e : eventrepository.findAll()) {
              System.out.println(e);
              events.add(e);
          }
          return events;
      }
  </code></pre>