As the token will get expired in one hour and we need to fetch new token, I want to know will be allocating cumstomIdentityProvider class again or thers is another ay of doing that. Need help.
This is i have implemented in My cumstomIdentityProvider.
- (AWSTask *)refresh {
/*
* Get the identityId and token by making a call to your backend
*/
// Call to your backend
// Set the identity id and token
self.identityId = IdentityId;
self.token = Token;
return [AWSTask taskWithResult:self.identityId];
}