The simplest way I implemented in my apps is to use the login information of the User. Example if the user registers with phone number or email, it means you already have these information on your database online.
So when the user login to your app, and it is successful, you just use his phone number or email or user id and subscribe that to your topic.
Public Sub SubscribeToTopics
fm.SubscribeToTopic("general") 'you can subscribe to more topics
Sleep(0)
fm.SubscribeToTopic("USERS-INFO-EXAMPLE-PHONE-NUMBER")
End Sub