[Bug]: The lost of refresh token in Google OAuth #763
Labels
API-Service
Backend Java Spring for the Lowcoder API
Enhancement
New feature or request
Java Backend
Pull requests that update Java code
Is there an existing issue for this?
Current Behavior
When login with Google account, it will return an access_token and an refresh_token, the access_token will be expired in about an hour, but the refresh_token will be valid all the time and it is used to get a new access_token, see here . In lowcoder, both of them will be stored in DB, but the problem is that the refresh_token will only be returned in the first time user login, if users logout and re-login, it will return null in refresh_token and once it has been stored in DB, we will lose refresh_token.
Without refresh_token, the access_token can't be refreshed automatically, users have to re-login again every hour, which is quite annoying.
It could be easily solved by adding these code in updateConnection function, ,
but it's too ugly, hope there could be any better solutions.
Expected Behavior
Users don't have to re-login every hour after login with Google account.
Steps to reproduce
Environment
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: