Hi guys,
I’m currently in the process of integrating my bubble app with Xero through Oauth 2.0. I am using the API connector’s none/self handled flow. My question is, what is the best way to handle the refresh token? Should I have a backend workflow to get a new access token every 30 mins, so it never expires (this just seems quite intensive as it is being refreshed even when the user is not using the app); or should I somehow only refresh the access token if current token is expired and user tries to make a call with the API (if so how would I go about doing this).
Ideally the 2nd method would be implemented as then there is need to refresh the token even when it is not being used. I believe the User-Agent flow uses the 2nd method I described, however I cannot use this flow due to certain limitations with it, and I don’t know how to replicate it.
I know there is prev topics on this but none seem to have a definitive answer.
Thanks in Advance