GCP gcloud
command has its access credential for each user account.
Obtains access credentials for your user account via a web-based authorization flow. When this command completes successfully, it sets the active account in the current configuration to the account specified.
GCP SDK has Application Default Credentials (ADC)
gcloud auth application-default login
Obtains user access credentials via a web flow and puts them in the well-known location for Application Default Credentials (ADC).
This command has no effect on the user account(s) set up by the gcloud auth login command.
Any credentials previously generated by gcloud auth application-default login will be overwritten.
Both gcloud auth login
and gcloud auth application-default login
open up a web page to select a google account.
Question is why do we need two different ways to get credential for google account? What are the reasons?