- import google script
<script src="https://accounts.google.com/gsi/client" async></script>
https://developers.google.com/identity/gsi/web/guides/client-library?hl=zh-cn
- add dom
<div id="g_id_onload"
data-client_id="YOUR_GOOGLE_CLIENT_ID"
data-login_uri="https://your.domain/your_login_endpoint"
data-your_own_param_1_to_login="any_value"
data-your_own_param_2_to_login="any_value">
</div>
https://developers.google.com/identity/gsi/web/guides/display-google-one-tap?hl=zh-cn
Top comments (0)