사용자 데이터 또는 기타 리소스에 액세스하기 위한 사용자 권한을 요청할 때는 초기 요청에서 모든 범위를 미리 요청하거나 증분 승인을 사용하여 필요에 따라 범위를 요청할 수 있습니다.
증분 승인을 사용하면 앱은 처음에 앱을 시작하는 데 필요한 범위만 요청한 다음, 사용자에게 요청하는 이유를 식별하는 맥락에서 새 권한이 필요하면 추가 범위를 요청합니다.
예를 들어 앱에서 사용자가 음악 재생목록을 Google Drive에 저장할 수 있다고 가정해 보겠습니다. 앱은 로그인 시 기본 사용자 정보를 요청하고 나중에 사용자가 첫 번째 재생목록을 저장할 준비가 되면 Google Drive 권한만 요청할 수 있습니다.
동의 화면이 부담스러워서 사용자가 로그인하지 않거나 특정 권한을 요청하는 이유를 혼동하고 있다고 생각되면 이 기법을 사용하세요.
다음 안내는 웹용이며 클라이언트 측 로그인 버튼 추가 안내인 Google 2.0 로그인 버튼 빌드에서 파생되었습니다.
웹의 증분 인증에 관한 자세한 내용은 OAuth 2.0 문서를 참고하세요.
추가 범위 요청
로그인 시 앱은 로그인 범위 profile와 앱 작동에 필요한 다른 모든 초기 범위로 구성된 '기본' 범위를 요청합니다.
나중에 사용자가 추가 범위가 필요한 작업을 수행하려고 하면 앱에서 이러한 추가 범위를 요청하고 사용자는 동의 화면에서 새 범위만 승인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-22(UTC)"],[[["The Google Sign-In JavaScript Platform Library is deprecated; developers should migrate to the Google Identity Services library for user authorization and access tokens."],["FedCM APIs will become mandatory for the Google Sign-In library, requiring developers to conduct an impact assessment."],["Incremental authorization allows developers to request user permissions in stages, starting with basic scopes and requesting additional scopes as needed, improving user experience."],["To implement incremental authorization, request the 'profile' scope initially and add further scopes like 'email' or 'drive' using `gapi.auth2.SigninOptionsBuilder` and `user.grant()` when required."]]],[]]