JavaScript: Stop auto-refresh session (non-browser)

Stops an active auto refresh process running in the background (if any).

Examples

Start and stop auto refresh in React Native

import \{ AppState \} from 'react-native'

// make sure you register this only once!
AppState.addEventListener('change', (state) => \{
  if (state === 'active') \{
    supabase.auth.startAutoRefresh()
  \} else \{
    supabase.auth.stopAutoRefresh()
  \}
\})