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
// If access token expired, check if the refresh token is expired and try to refresh it
72
+
// There's a bug in GH Api that returns 200 error response because it thinks there is a problem with the refresh token (there is not), so we check here if the refresh works.
73
+
// if it does, then refreshAccessToken returns true and a new access token is saved, so getAccessToken can return it (without needing to refresh).
74
+
// if it doesn't, then returns false and the user will be prompted to re-authorize GitHub. (using generateAccessToken)
// the lines below won't run in current setup, since if we call getAccessToken, we already refreshed the access token if needed in isAccessTokenAvailable.
106
+
// but if Github resolve their problem, the normal workflow should be used instead, i.e. in isAccessTokenAvailable, we only check if the access token is expired without refreshing.
107
+
// The refresh will be done below then (check the isAccessTokenAvailable method for more details)
101
108
if (!accessToken.getRefreshTokenExpiresAt().isAfter(now)) {
102
109
thrownewEntityNotFoundException("Access token expired and refresh token expired for user " + currentUserInfo.getId() + " and provider " + provider);
0 commit comments