RobinBobin / react-native-google-drive-api-wrapper

This wrapper facilitates the use of the Google Drive API in React Native projects.
110 stars 43 forks source link

How long does the GDrive access token live? #50

Closed losh11 closed 3 years ago

losh11 commented 3 years ago

I'm very interested in using this project for auto-uploading hidden backup files to the users Google Drive. This backup occurs infrequently. Sometimes during the same sessions, or often during multiple app sessions (where the device may be rebooted, or app force killed, suspended etc). So I'm wondering how long does the GDrive access token stay alive? I would like to minimise the number of signins as possible, because I feel this may not be good UX.

RobinBobin commented 3 years ago

I don't have a slightest idea, actually :slightly_smiling_face: . It's up to a user of my module which module to use for google sign in. I think it's ok to save the access token with async storage or something alike. Sooner or later one of the methods you use to access google drive with fail with an authorization error message. You can re-authenticate then.

RobinBobin commented 3 years ago

Even better. @react-native-google-signin/google-signin has a message signInSilently(). I think that's your choice.

RobinBobin commented 3 years ago

It's been inactive for a while, so I'll close it. Please reopen if you need to.