TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi jp
NA
323
77.3k
login with google after redirect home page and display email
May 5 2021 6:12 AM
This code in login page.i want to show name email after login but dont know how to pass data another homepage
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log("ID: " + profile.getId()); // Don't send this directly to your server!
console.log('Full Name: ' + profile.getName());
console.log('Given Name: ' + profile.getGivenName());
console.log('Family Name: ' + profile.getFamilyName());
console.log("Image URL: " + profile.getImageUrl());
console.log("Email: " + profile.getEmail());
document.getElementById('name').innerHTML = 'Full Name:' + profile.getName();
document.getElementById('gname').innerHTML = 'Given Name:' + profile.getGivenName();
document.getElementById('fname').innerHTML = 'Family Name: ' + profile.getFamilyName();
document.getElementById('image').innerHTML = "Image URL: " + profile.getImageUrl();
document.getElementById('email').innerHTML = "Email: " + profile.getEmail();
// The ID token you need to pass to your backend:
var id_token = googleUser.getAuthResponse().id_token;
console.log("ID Token: " + id_token);
localStorage.setItem("lastname", "Smith");
}
</script>
Reply
Answers (
1
)
multiple images insert by separate table using webapi
Passing InnerHTML to Another Page in javascript