'Store the current refresh token in the db, also invalidated
the site_key (authorization code) because it can not be used
again.'

def update_refresh_token(self):

    repository = self.repository
    repository.site_key = None
    table = current.s3db.sync_repository
    current.db((table.id == repository.id)).update(refresh_token=repository.refresh_token, site_key=repository.site_key)
    return
