-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I implemented my own IAuthStore and after persisting it the Podio.OAuth doesn't get set to the new value.
I need to manually set it in the first place after construction, which is pretty silly, considering I pass the IAuthStore that holds PodioOAuth to the constructor:
_podio = new PodioAPI.Podio(podioClientId, podioClientSecret, podioOAuth) { OAuth = podioOAuth.PodioOAuth };
Since the IAuthStore.Set is called somewhere in the Podio library when I make a call to Podio, I can't know when to manually reset the Podio.OAuth object besides having a singleton PodioAPI object and keeping the record of IPodioOAuth.Set calls and then re-do the request to Podio after it fails and I reset the new OAuth object, because it was still trying to use the old OAuth, which apparently gets disposed of. At least that's what I assume from the ObjectDisposedException I get.
If I understand it correctly the old OAuth object get the dispose() call, but the new one is not set in it's place.