我使用以下代码对我的网站上的用户进行身份验证:
function handleCredentialResponse(response) {
console.log("Encoded JWT ID token: " + response.credential);
window.onload = function() {
google.accounts.id.initialize({
client_id: "XXXXXXX.apps.googleusercontent.com",
callback: handleCredentialResponse
});
google.accounts.id.renderButton(
document.getElementById("buttonDiv"),
{ theme: "outline", size: "large" }
);
<div id="buttonDiv"></div>但是我需要用我的网站设计来定制按钮..。
有可能像这样创建我自己的按钮吗?
<button type="button" onclick="googleLogin();">Connection with Google</button>还有我能联系到的人。我测试了几个变体,但是它不起作用,初始化没有发生.
如何自定义保持当前代码的按钮(或者只是稍微修改一下)?
你有什么主意吗?
https://stackoverflow.com/questions/72727489
复制相似问题