Various authentication methods are available from the google-auth library and refer to this documentation setup authentication.
To Set up ADC with the credentials that are associated with your Google Account. After you install and initialize the gcloud CLI, configure ADC using:
gcloud auth application-default login
A sign-in screen appears. After you sign in, your credentials are stored in the local credential file used by ADC.
Use the GOOGLE_APPLICATION_CREDENTIALS
environment variable to provide the location of a credential JSON file within your GCP project.
For more information, see Set up Application Default Credentials.