Events

onLogout

This callback will be called after the user logs out.

It will be called either when the user explicitly logged out by calling handleLogOut or when the user's token expired.

Usage

<SophonContextProvider
  settings={{
    events: {
      onLogout: (args) => {
        console.log("onLogout was called", args);
      },
    },
  }}
>
  {/* ... rest of your app ... */}
</SophonContextProvider>