Google OAUTH2 Authentication Loop

I've been mulling over this for some time and can't get my Google OAUTH2 settings to act predictably.

Attached screenshots to show my settings. Everything works if I manually re-authenticate in edit app. In preview mode user gets an Authentication Loop.

If I disable "Enable an auth verification endpoint" the loop goes away but user has to manually re-authenticate. I don't see an option to automatically run an auth workflow here either.

Also in auth configuration page "See Token Status" says Access Token is granted but not Refresh or ID Tokens.

Ideal behaviour permanent authentication for all users once I manually retrieved Access and Refresh Tokens. Alternatively they could each authenticate once than token refreshes.

Hey @untethered ,

It's a bit hidden on this docs page but under API Authentication it says

  • The "auth verification endpoint" is used to test whether or not the user is currently authenticated. Retool will make a GET request to the URL and if the response is not a 20x, it will pop a modal open and ask the user to authenticate against the API.

That is likely what is happening here because I don't believe the base URL is an endpoint with a valid response. I am not sure what the google drive endpoint is but I used https://www.googleapis.com/calendar/v3/colors for the google calendar API to test it out.

Hope this helps!

Ah! Thank you so much for this - just when I thought Google API couldn't get more confusing I discovered that https://www.googleapis.com/drive/v3/files returns 200 but https://www.googleapis.com/drive/v3/ doesn't.