Quote Originally Posted by carlwhat View Post
i think @swguy's solution is a bit of a hack; but if it works, i think it is fine for now.

i have plans to do some refactoring and updating of the module, and specifically with the handling of production v sandbox environments as well as the renewal of the tokens. unfortunately i'm currently a little strapped for time and perhaps a bit un-motivated. but we will see....
hi @swguy,
i have looked at what you wrote up and i think it is fine. when i initially read it, i thought one was removing files and then re-uploading them.

the bigger issue to me is a more elegant way of handling this situation with the code. which is why i think a refactor may be in order...

but i think (and appreciate) you documenting this situation and the way to address it. and in further examining it, i think it covers the situation well. in addition, the term, hack, was poorly chosen on my part.

hopefully, i will get some time and make this situation a little cleaner. again, i was initially following the old square module code, as opposed to re-thinking about, perhaps a better way to handle the renewals of the OAuth.

i will now add that to my async wiki....

best.