When a user register/sign in, the mobile app will call
register device API. This API creates a row in the
device table. The application server uses the
token in the
device table to send push notification.
I m not sure the best way to handle errors such as:
when the FCM token expires or invalid, such as in a queued job that sending a push and received an Exception, how do I tell the mobile app that the token is bad and need to register a new token again?
when the mobile app fails to register device API during register new account or signing in, and the API fails, I must allow the user to continue using the app. But need to have a way to tell the mobile app to try to register device later.