def set_credentials(self, credentials): # check if refresh token exists before saving credentials ( only given when authenticating not refreshing ) if self.identifier and credentials.refresh_token: buffer = CredentialsUserWrapper() buffer.from_credentials(credentials) buffer.save(self.get_credentials_path())
def set_credentials(self, credentials): # check if refresh token exists before saving credentials ( only given first time through auth )? if self.identifier: buffer = CredentialsUserWrapper() buffer.from_credentials(credentials) buffer.save(self.get_credentials_path())