Ionic dont save user token

Hi there,
I want to add a device token to an user in my app. I have the device
token, I have the user, but I cant add the token to the user despite
read a lot of documentation about the issue.

Anyone can help me please?

Here is the code, thanks

`var io =;

username = localStorage.getItem('username');

var signupSuccess = function(user) {
  // user was authenticated, you can get the authenticated user



var signupFailure = function(errors) {
  for (var err in errors) {
    // check the error and provide an appropriate message
    // for your application
    user = Ionic.User.current();
var details = {

  'email': '',
  'password': 'pass2',

Ionic.Auth.signup(details).then(signupSuccess, signupFailure);

var push = new Ionic.Push();
var user = Ionic.User.current();

var callback = function(pushToken) {

  console.log('Registered tokens:', pushToken.token);

  alert('TOKEN: '+pushToken.token);

  user.addPushToken(pushToken);; // you NEED to call a save after you add the token



Some SO links say you have to add token to user like this push.addTokenToUser(user); in your register callback.

Also double check if you included ‘ionic.service.push’ in your app.js

Is not addTokenToUser method deprecated right now in beta ?

You are right. It is deprecated.

From the migration guide, looks like its no longer needed to add the pushToken to the user.

You now no longer add device tokens via the User object – see the push changes below.

They say this link has the entire overview of the new push