Skip to content

Add Documentation About Using Delegated Credential With Service AccountΒ #1699

@melvinkcx

Description

@melvinkcx

In this guide, it provides code example to use delegated domain-wide authority in Python.

from google.oauth2 import service_account

SCOPES = ['https://www.googleapis.com/auth/sqlservice.admin']
SERVICE_ACCOUNT_FILE = '/path/to/service.json'

credentials = service_account.Credentials.from_service_account_file(
        SERVICE_ACCOUNT_FILE, scopes=SCOPES)

delegated_credentials = credentials.with_subject('[email protected]')

However, this seems to be non-existent in this Nodejs client lib. I spent some time navigating the source code before I managed to use delegated credential in Nodejs.

Hence, I suggest we supplement this piece of information in the README.

Metadata

Metadata

Assignees

Labels

type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions