You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, ,
//if auth by google, set refresh tokenif (authUser.getSource().equals(AuthSourceConstants.GOOGLE)) {
authUser.getAuthToken().setRefreshToken(oldConnection.getAuthConnectionAuthToken().getRefreshToken());
}
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
login with Google account
logout
re-login with same Google account
wait an hour, refresh the page, it will redirect to login form
Environment
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
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: