Skip to content

GoogleCredentials Deprecated but is still used as an example for authentication #3314

Closed
@Kool-Koder

Description

@Kool-Koder

Hi Admin,

GoogleCredentials has already been deprecated but is still being used as an example in the Authentication using OAuth2. Would like to use the more updated version. Hope there will be some update. Thanks! :)

If you already have an OAuth2 access token, you can use it to authenticate (notice that in this case, the access token will not be automatically refreshed):

Storage storage = StorageOptions.newBuilder()
    .setCredentials(new GoogleCredentials(new AccessToken(accessToken, expirationTime)))
    .build()
    .getService();

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions