Greengrocer
New Coder
Hey there! I have a question. I made OAuth2 client. I Took id, settled origin, Redirect, scope(userifo/email/profile, openid).I did not use plugin sign in with Google. The code:
<script src=”https://accounts.google.com/gsi/client” async defer></script>
<div id="g_id_onload"
data-client_id="123...example.com"
data-callback="handleCredentialResponse">
</div>
<div class="g_id_signin" data-theme="filled_black" data-type="standard"></div>
<script>
function handleCredentialResponse(response) {
if (response.credential) {
// Handle the credential response
var idToken = response.credential;
// Send the ID token to your server for verification and processing
// ...
window.location.href = 'example.ee';
// Redirect the user to the desired page
} else {
// Handle error
console.error('Credential error:', response.error);
}
}
</script>
I have put In the file.php of the page where is log in. The button sign in with Google has been appeared. Client ID works, the main problem that when I use sign in button and got in chat, out there does not reflects menu and a field to leave messages. As I understood the system does not recognize users who use sign in with Google as subscribers. Who see what problem I have ? How to resolve it.
<script src=”https://accounts.google.com/gsi/client” async defer></script>
<div id="g_id_onload"
data-client_id="123...example.com"
data-callback="handleCredentialResponse">
</div>
<div class="g_id_signin" data-theme="filled_black" data-type="standard"></div>
<script>
function handleCredentialResponse(response) {
if (response.credential) {
// Handle the credential response
var idToken = response.credential;
// Send the ID token to your server for verification and processing
// ...
window.location.href = 'example.ee';
// Redirect the user to the desired page
} else {
// Handle error
console.error('Credential error:', response.error);
}
}
</script>
I have put In the file.php of the page where is log in. The button sign in with Google has been appeared. Client ID works, the main problem that when I use sign in button and got in chat, out there does not reflects menu and a field to leave messages. As I understood the system does not recognize users who use sign in with Google as subscribers. Who see what problem I have ? How to resolve it.