I am having a similar issue. It successfully logins, works OK.
However, when I refresh the page,
the isAuthenticated always becomes false (even though I am taking care of isLoading).
{isLoading && <Spinner />}
{!isLoading && (
isAuthenticated ? (
<UserDropdown
user={user}
handleLogout={logoutWithRedirect}
/>
) : <span>Login</span>
)}