I encountered a problem while working with Typescript that I couldn't quite figure out. Although I came across similar issues in other topics, I'm still struggling to find a solution for my particular issue. I can easily log userCredential.user.metadata.b, but I keep getting an error: Property 'b' does not exist on type 'UserMetadata'. Can someone please explain what I'm doing wrong here?
Below is the snippet of code
<pre>
login(email: string, password: string): Promise<any> {
return this.afAuth.signInWithEmailAndPassword(email, password)
.then(userCredential => {
const creationTime: number = userCredential.user.metadata.b; // <-here is a problem
console.log('creationTinme', creationTime);
this.handleAuthentication(
userCredential.user.email,
userCredential.user.uid,
'xxx',
creationTime
// metadata.creationTime expiresInuser.metadata
);
})
.catch(error => {
console.log(error);
});
</pre>
Thank you in advance for any assistance provided.