Closed
Description
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