I have implemented Firebase for authentication in plain JavaScript, without using any frameworks like AngularJS or Angular2. When a user signs up successfully with Google or Facebook, I want to display their name, email, and profile picture.
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// User is signed in.
var displayName = user.displayName;
var email = user.email;
var photoURL = user.photoURL;
} else {
// User is not logged in, redirect as needed.
console.log("Logged out");
}
The above code snippet should be displayed on the page after successful signup.
However, when I tried to display the details using the following code, only the text within the tags showed up:
<p class="isLoggedIn">Logged In: {{user_displayName}} ({{user_email}})<p>
I'm not sure why it's not displaying the user details correctly. Any help would be appreciated. Thank you.