Associate a Push Token Device to a User ID


Hello, I need to associate a push token to a User.
The push token is correctly generated on device.ready. However the user may be
not authenticated yet. How can I associate the already generated token to the user,
once the has been authenticated?

Old Ionic version 1.0 had exactly what I am looking for :

var user = Ionic.User.current();

// once authenticated

//once logged out

but these methods are not available anymore with version 1.3