GCP Professional Cloud Architect Practice Question

Your company is developing a single-page web application that authenticates users with Google OAuth 2.0. During initial sign-in the app only needs the user's basic profile, but later it offers an "Export to Drive" feature that must write a file into the user's Google Drive. Product management wants to maximize consent-screen acceptance rates while following Google API authorization best practices. What is the most appropriate way to request OAuth scopes?

  • Ask for the basic profile scope during login and use OAuth incremental authorization to request the drive.file scope only when the user clicks Export.

  • Request the profile, drive.file, and cloud-platform scopes together during the initial sign-in so the user is prompted only once.

  • Authenticate a backend service account with domain-wide delegation and impersonate each user for all Drive operations, avoiding further scope prompts.

  • Call the Drive REST API with an unrestricted API key embedded in the web page, eliminating additional consent dialogs.

GCP Professional Cloud Architect
Managing implementation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot