authstat json <-> object

import { Storage } from ‘@ionic/storage’;
import { FirebaseAuthState } from ‘angularfire2’;

// authstate  object -> json

this._auth.signInWithEmailAndPassword(this.loginForm.value.email, this.loginForm.value.password)
.then((authData: FirebaseAuthState ) => {
  this.storage.set(‘alluserinfo’, JSON.stringify(authData));
});

//json -> authstate  object

this.storage.get(‘alluserinfo’).then((t_value) => {
      let value: FirebaseAuthState;
      value = JSON.parse(t_value);
});