Skip to content

Podio.OAuth not updated after OAuthStore.Set called in the async version #42

@LUS1N

Description

@LUS1N

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions