I've built a Google Sheets oAuth flow, and it's working most of the time.
When it's successful, it returns a refresh token
and access token
. I'm able to successfully use the refresh to generate new access tokens, but that is not my issue.
I've noticed that once a refresh token
is issued for a specific Google account, I'm unable to use it again to test the oAuth flow. I can complete the steps, but it stops returning the refresh token
in the response if it's already been issued.
This is really just making it hard to actually test my application, since once I've used an email I'm unable to test with it again.
Does anyone have any recommendations for how to successfully test repeatedly, without needing to generate a ton of real email accounts?
Thanks for any ideas,
Patrick
Edit: Found answer in this thread: Not receiving Google OAuth refresh token
TLDR: I needed to add prompt=consent to the auth URL in order to force the refresh token to come back every time after the first auth.