How to send push notification only if user is logged in

Hi:

We are building an app with authentication using Expo and cognito and we have some scheduled push notifications for our users, but how we can send this notifications only if the user is logged in in the app?

Thanks!