1 Star 0 Fork 0

kantboot/kantboot-uniapp-frame-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
google.html 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
自由的道德群众 提交于 2024-01-25 15:36 . 小改
<html lang="en">
<head>
<meta name="google-signin-scope" content="profile email">
</head>
<body>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="126741023711-fn3726l3dguu87ie2bb3hrhln841iq24.apps.googleusercontent.com">
<div class="g-signin2" data-onsuccess="handleCredentialResponse"></div>
<script>
function onSignIn(googleUser) {
// Useful data for your client-side scripts:
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());
// The ID token you need to pass to your backend:
var id_token = googleUser.getAuthResponse().id_token;
console.log("ID Token: " + id_token);
}
</script>
</body>
<style>
</style>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kantboot_2/kantboot-uniapp-frame-test.git
git@gitee.com:kantboot_2/kantboot-uniapp-frame-test.git
kantboot_2
kantboot-uniapp-frame-test
kantboot-uniapp-frame-test
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385