BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 16 Question 120 Discussion

Posted by Oretha on May 05, 2026 at 08:30 PM

You are developing a Java Web Server that needs to interact with Google Cloud services via the Google Cloud API on the user's behalf. Users should be able to authenticate to the Google Cloud API using their Google Cloud identities. Which workflow should you implement in your web application?

Suggested Answer: D

https://developers.google.com/identity/protocols/oauth2#webserver

The Google OAuth 2.0 endpoint supports web server applications that use languages and frameworks such as PHP, Java, Python, Ruby, and ASP.NET. The authorization sequence begins when your application redirects a browser to a Google URL; the URL includes query parameters that indicate the type of access being requested. Google handles the user authentication, session selection, and user consent. The result is an authorization code, which the application can exchange for an access token and a refresh token.


Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
33 comments · newest first
ER
Ernie 24 hours ago
I like C too. It feels user-friendly.
VA
Vallie 6 days ago
It uses OAuth 2.0, which is secure.
LA
Lauryn 11 days ago
Why do you prefer D?
VA
Vallie 16 days ago
I think option D is the best choice.
OT
Otis 22 days ago
And it follows best practices for OAuth.
BE
Beckie 27 days ago
Exactly! User experience is better with SSO.
SO
Solange 1 month ago
Plus, users trust Google for authentication.
MA
Mariko 1 month ago
Right! Less risk of data breaches.
OT
Otis 1 month ago
Definitely D. No need to handle passwords directly.
BE
Beckie 2 months ago
Option C is good too, but I prefer D for the token exchange.
SO
Solange 2 months ago
Agreed! It uses SSO, which is safer.
MA
Mariko 2 months ago
I think option D is the best. Secure and straightforward.
BR
Brinda 2 months ago
D is the future of secure API access.
NA
Nakisha 2 months ago
Totally! Less chance of credential leaks.
DE
Detra 2 months ago
D also reduces security risks.
LE
Leila 3 months ago
Exactly! Users prefer SSO.
KA
Kara 3 months ago
Plus, user experience is better with D.
LO
Lorean 3 months ago
Right! D aligns with OAuth 2.0 best practices.
BR
Brinda 3 months ago
B is outdated. We need modern OAuth flows.
NA
Nakisha 3 months ago
Yes, A is a no-go. Passwords should never be stored.
DE
Detra 3 months ago
I dislike A. Storing passwords is risky!
LE
Leila 4 months ago
Option C is also good, but D feels more complete.
KA
Kara 4 months ago
Agreed! It handles tokens properly.
LO
Lorean 4 months ago
I think option D is the best. Secure and straightforward.
NA
Naomi 4 months ago
Isn't storing the authorization code in cookies a security risk?
AD
Adela 4 months ago
B is outdated; we should always use access tokens now.
MA
Matthew 5 months ago
Wait, why not just use option C? Seems simpler.
FE
Fernanda 5 months ago
Totally agree, D is the way to go!
WE
Wenona 5 months ago
Option D is the best choice for OAuth 2.0.
MA
Mammie 5 months ago
I feel like option C is close, but it seems to miss the step where the application exchanges the authorization code for an access token, which is crucial for accessing the API.
MA
Mammie 7 months ago
I practiced a similar question where we had to implement OAuth 2.0, and I think option D aligns with that workflow since it involves exchanging an authorization code for an access token.
RO
Rodolfo 7 months ago
I’m a bit unsure about the difference between the authorization code and access token processes. I think option D sounds familiar, but I can't recall the exact flow.
GL
Glendora 7 months ago
I remember we discussed the importance of not handling user passwords directly, so I think options A and B are definitely not the right choice.
0/2000 characters

Save Cancel