Merge pull request #727 from andig/feature/mcc-refresh-token

Fix token refresh change
This commit is contained in:
andig 2021-03-06 17:48:58 +01:00 • committed by GitHub
commit bd89791ec4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,8 +108,8 @@ func (mcc *MobileConnect) fetchToken(request *http.Request) error {
}
mcc.token = tr.Token
// According to the Web Interface, the token is valid for 10 minutes
mcc.tokenValid = time.Now().Add(10 * time.Minute)
// According to the Web Interface, the token is valid for 2 minutes
mcc.tokenValid = time.Now().Add(2 * time.Minute)
// the web interface updates the token every 2 minutes, so lets do the same here
mcc.tokenRefresh = time.Now().Add(2 * time.Minute)