Discussions

Ask a Question
Back to All

Add-on authentication after refresh token expiry

I've been reading up on creating "Web Service Hosted Add-ons" and "External Integrations" with a view to integrating an app which I've written. I think I understand the authentication flow. Just one question. When someone activates the add-on by pressing "Connect", the OAuth process is kicked off and my app gets granted an access and refresh token. I assume this process of connection is only envisaged to be performed once (apologies if this is a basic question, but I am quite new to servicem8 and haven't actually activated any add-ons myself). I'm just trying to work out what happens in the edge case that no one uses the add-on for over a month and the refresh token expires? The OAuth process has to be initiated again I assume. Do they press 'Connect' again, or would I provide a menu item button which allowed them to 'Re-connect' the app with their servicem8 account. Obviously, the add-on wouldn't be very useful if it wasn't used for so long! but nevertheless, the question is bugging me!

Many thanks.