Ionic firebase createUserWithEmailAndPassword return null

Hi, I’m creating an app with firebase integration.
when I create a new user the account are correctly created but the function return null and so I cant get the user uid.

import { FirebaseAuthentication } from '@ionic-native/firebase-authentication/ngx';


 return new Promise<any>((resolve, reject) => {
      this.firebaseAuthentication.createUserWithEmailAndPassword(value.email, value.password).then(
        res => {
          console.log("User id after reigstration = "+res.user.uid);
          resolve(res);
        }, err => {
          reject(err);
        }
      )
    })

Dont create a new Promise and replace resolve(res) with return res

Maybe that works better

And then when that works only return the firebase method. That method returns a promise, so creating a new one is a waste