Improved so that you can post to the bulletin board after logging in

Today, we're going to use loose leaf, the service we're currently creating, to consider an implementation that only logged-in users can post.

http://copyrightfree.co/

Make sure the user is logged in

This is OK if you put the following code in the place called mounted

Check user login or not
    firebase.auth().onAuthSTateChanged(function(user) {
      if (user) {
        console.log('login');
      Else
        console.log('logout');
      }
    }); 

In addition, since it is possible to get the user ID or display name from the variable called User, it is necessary to consider how to make effective use of it.

タイトルとURLをコピーしました