Answer the question
In order to leave comments, you need to log in
Google authorization. How to pass parameters via ajax?
I need to send parameters after authorization: first name, last name, ajax request and then refresh the page. I do authorization and that everything comes to crm. I am using the POSTMAN program to create requests. After authorization, I get all the information by this function.
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
</script>
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.localhost.com/property-organizer-login/?firstName=1&lastName=2&[email protected]",
"method": "POST",
"headers": {
"Cache-Control": "no-cache",
"Postman-Token": "29cc33c6-112b-457f-91fd-75ed43e6b669"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question