作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想集成一个自动登录弹出窗口,如 https://www.lequipe.fr 中显示的那样。
它会在浏览器中检测您的 session 并询问您是否要使用您的 Google 帐户加入。
我怎样才能在我的网站上实现这一点? (我已经有 Google 登录) - 正在使用 GAPI API?
谢谢
最佳答案
它是 Google One-tap sign-up ,它可以使用他们的 API 进行集成,请关注 this guide在您的网站中设置 Google One Tap。
在 Google 控制台中添加 Oauth2 ClientID 后。你只需要使用类似的东西:
<!DOCTYPE html>
<html>
<head>
<script src="https://accounts.google.com/gsi/client" async defer></script>
</head>
<body>
<div id="g_id_onload"
data-client_id="XXXXXXXXXXXX-bk2lj5rs6l4c6g23nmtsfdh66qhfu921.apps.googleusercontent.com"
data-login_uri="https://localhost:3000/login"
>
</div>
</body>
</html>
关于google-chrome - 如何在我的网站中从 Google 启用此凭据选择器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62265598/
我是一名优秀的程序员,十分优秀!