You can use Amazon Cognito's Hosted UI, which uses session cookie. However, session cookie duration is currently fixed at one hour. So, the user has to login again on hosted UI after one hour. I have provided responded here as well for the similar question stackoverflow.com/a/78129985/1273882.
thank you so much! im new to web dev and was watching another guy's aws from 3yrs ago to use cognito with react, his domain part looks different from nowadays aws and im so confused cuz i couldn't find that section. ur video is super clear in explanation and everything . thank you !!1