Я использую вход в Google на веб-сайте и при помощи стандартной кнопки SVG логотип Google не отображается. У кого-нибудь были проблемы с этим. Я использую стандартный код прямо из документации. Я не хочу включать их собственные кнопки PNG, но у меня нет выбора.
<div id="my-signin2"></div>
<script>
function onSuccess(user) {
var profile = user.getBasicProfile();
//console.log('ID: ' + profile.getId());
//console.log('Name: ' + profile.getGivenName());
//console.log('Name: ' + profile.getFamilyName());
//console.log('Email: ' + profile.getEmail());
//console.log(user.getAuthResponse().id_token);
validateGoogleSignin (profile.getEmail(), user.getAuthResponse().id_token, profile.getId(), profile.getGivenName(), profile.getFamilyName(), "", "login");
}
function onFailure(error) {
console.log(error);
}
function renderButton() {
gapi.signin2.render('my-signin2', {
'scope': 'profile',
'width': 240,
'height': 50,
'longtitle': true,
'theme': 'dark',
'onsuccess': onSuccess,
'onfailure': onFailure
});
}
</script>
<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>