기본적으로 나는 내 웹 사이트에서 Google-oauth
을 사용하고 있지만 지금까지는 getBasicProfile()을 알고 있지만 내 웹 사이트에서는이 Google 사용자가 내 웹 사이트에서 Google 카드로 항목을 구입할 수 있기를 원한다. 그가 가진 특권의 종류?Google oauth에서 더 많은 권한을 얻는 방법?
여기 내 구글의 OAuth 버튼 생성 코드입니다 :
<!DOCTYPE html>
<html>
<head>
<meta name="google-signin-client_id" content="921258372597-t5jrb0e9p4ivstp9mfi972lhcvfcuo59.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId());
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail());
}
</script>
</head>
<body>
<span><h1>google sign in Button</h1></span>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
</body>
</html>