How to use RefreshRokens?

Hi,

Perhaps it's me not seeing the obvious, but referring to this page:

I really like this new feature as I am building an application that will be in use 24/7 and users may have changes - not committed to my XData server yet - at any time.

However, it is not clear to me how to practically implement this. Defining the ClientApp is clear but how do I get a new token? Via a TSphinxLogin method, or does the TSphinxLogin handle it automatically (keep refreshing until user logs off) or is there another mechanism to use?

A short explanation or small example would be appreciated!

When you get your access token, a refresh token will also be sent.
When your access token is expired, you can simply ask (via HTTP request) for another one, using the refresh token. No need to ask for the user to login again.

I saw that in the documentation indeed, but how to do that?

Can you give me a short example, perhaps some (pseudo-)code? Is there any reason it's not implemented in the TSphinxLogin component?