ReactNative - how to refresh the token when a token is expired

The access token expires after 24 hours. To ensure the user remains logged in even after the access token expires, I am currently checking its validity using hasValidCredentials().

How can I obtain the refresh token, and how can the user stay logged in using the React Native SDK?