DEV Community

Discussion on: Authenticate users with firebase and react.

Collapse
 
somtookaforr profile image
Somtochukwu Okafor • Edited

Thanks Tallan for the amazing tutorial. I ran into some errors trying to reproduce it in my react project.
"TypeError: Cannot destructure property 'token' of 'Object(...)(...)' as it is undefined."

Please could you look at this?

Collapse
 
alexomosa profile image
Alex-omosa

try checking the way you are importing firebaseAuth ,
Import like this
import { firebaseAuth } from './../provider/AuthProvider';
instead of like this
import firebaseAuth from './../provider/AuthProvider';

I got the same error, this how I solved it