user3629400
user3629400

Reputation: 13

Google Drive persistent authorisation

Is it possible to generate a persistent form of OAuth 2.0 authorization for accessing a Google Drive account? Based on documentation on OAuth 2.0 credentials that authorize access to user's data, it seems that the authorization is short lived and needs to be refreshed.

Use-case: a standalone application is installed in users' local machine(s). The user would authorize access to its Google Drive account upon installation of this application. The application would store credential/authorization information locally and would use it to access the Google Drive without involving the user every time that access to Google Drive is required.

Upvotes: 1

Views: 176

Answers (2)

Owen Cao
Owen Cao

Reputation: 8183

Yes. Once your access token expires, you can use the refresh token to obtain a new one.The refresh token will not expire until the user revokes access to your application.

So in this way you can get a new access token again and again until the user who authorized the access revokes access to your application.

Upvotes: 1

pinoyyid
pinoyyid

Reputation: 22306

Yes that is possible. The application needs to have an embedded refresh token that it can use to request access tokens as and when it needs them. You will need to consider the security implications of this approach.

Upvotes: 0

Related Questions