How would you achieve saving both both the push notification token and username on the app launch?

When we are asking the user’s push notification permission on the app launch, and we save the push token in our backend, how would you later determine which user does the token belongs to if you want to send push notification to a specific user?

My thinking is that there is no way we can know the user id or username before the user logs in, in the meantime, we are making the post request the first thing which is before the user logs in.

How would you achieve saving both the push token and username or id?