I do not want to store my session details in localStorage, sessionStorage or cookies as they are vulnerable to xss attacks. I do know that aws amplify provides custom memory storage functionality but it does not persist the session on page refresh.
I tried using custom memory storage but the session is destroyed on refresh.