I am working with a webservice rest
in java
in which the users access the data of a base de datos mysql
, the authentication was done with JWT
.
Then, looking for how to send the notifications I stumbled upon Firebase
and I see that I can implement the authentication, but the question that arises is that taking into account that when sending the token
in the way that it did at the beginning I did not store it in my base de datos
but I did it in the device in your preferences.
Now to send you the use notification Firebase
, you would have to store the token that I send you to associate it with the user and thus be able to send you the notificaciones
that you want (I send them when there is a change in the database) or Can I, based on username and password, "consult" at Firebase
what token did he give to identify which user he is and thus send him his notification?