Page 1 of 1

Gmail OAuth authentication expires every 7 days

Posted: Tue Nov 08, 2022 12:06 pm
by giuseppe
Hi there,
I have carefully followed all instructions to set up a Gmail OAuth authentication for use with Hesk but I have the problem that my Gmail OAuth expires every 7 days.
After some researches online I found that A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days. (source https://developers.google.com/identity/ ... expiration).
What can I do to not make it expire every 7 days?
I found out that I should publish the app but it requires approval. How to get approved without the risk of getting rejected? Is there a guide?
Or can we do something without needing approval?
I also tried to switch my app user type from "External" to "Internal" but I'm not allowed because I need to be a member of google workspace.

I have latest Hesk version (3.4.1).
Other sources
https://stackoverflow.com/questions/694 ... seven-days
https://stackoverflow.com/a/67468463

Thanks in advance for your help,
Giuseppe

Re: Gmail OAuth authentication expires every 7 days

Posted: Tue Nov 08, 2022 7:26 pm
by Klemen
The problem here is that once your app is verified, anyone with a Google account can use it. Hence Google has strict verification policies in place.

I don't have a good answer for you regarding OAuth as I don't know of a way to configure Hesk to work out-of-the-box with Google. Users must go through this process themselves.

If you don't have Google Workspace, the solution would likely be to use Basic authentication instead. Register and use an App password instead of your email password to login.

Re: Gmail OAuth authentication expires every 7 days

Posted: Tue Nov 08, 2022 11:41 pm
by giuseppe
Hi Klemen,
thanks for your reply.
I have switched to basic authentication as you suggested.

I'll keep following hesk social networks to see if there will be any update regarding this topic.

Thanks!!!