DEV Community

Discussion on: Firebase V9 LogIn with Google in React and NextJS

Collapse
 
xxx69420 profile image
X

In step 4, where do you define "// Import useAuth from context
import { useAuth } from "../context/AuthContext";"? There is not useAuth.

Collapse
 
shareef profile image
Mohammed Nadeem Shareef

useAuth coming from context, which I haven't explained in this blog, and I have mentioned to ones ready the context blog...
And the code we are writing in step 3 is inside context and we export it as useAuuth

If you still have doubt tell me... I will explain in detail.

Collapse
 
samsonbrody profile image
samsonbrody

I need help understanding this. it seems you are omitting the Auth context part which is critical to understanding how all of this works

Collapse
 
litehacker profile image
Giorgi Gvimradze

If the tutorial needs some previously done components, you at least need us to know the code to paste, if you don't want to share it here. Otherwice it's useless. Let this page be independent from the previous blog post.

Thread Thread
 
shareef profile image
Mohammed Nadeem Shareef

Thanks, I have updated the blog and mentioned that this blog doesn't show how to setup context API but you read my other blog on context API using Next.js and Typescript