For version v5.
Update the auth method in your config.
auth
auth: { method: 'amplify', },
.env
VITE_AWS_AMPLIFY_USER_POOL_ID=
User pool id:
VITE_AWS_AMPLIFY_USER_POOL_WEB_CLIENT_ID=
User pool web client id: