Problems after OAuth2 login

Hi,

We are integrating a Gmail node to fetch new messages. After using OAuth2 (and setting up console at Google) we are able to get all messages from Gmail account.

Some time later (a few hours) we get next message: Error: No refresh token

We assume this is caused when we have no refresk token to update access_token.
Have you detected this situation?

Thanks!

Actually yesterday I had a similar issue and was tracking it. It’s seems like Google just returns the refresh_token the first time you do the OAuth2 flow. I think the issue happens the first time the token is refreshed as it overrides the refresh_token. So the second time the token is gonna be refreshed there is not refresh token. Not 100% sure but this is my suspicion.

If that’s the case by adding prompt=consent to the url should fix the issue as it will always return the refresh token. Let me discuss with @jan and we will keep you posted.

Info about the can be found here gdata - Not receiving Google OAuth refresh token - Stack Overflow

Thanks for letting us know.

1 Like

Starting from the just released version [email protected] does it now always add “prompt=consent” automatically.

1 Like