Create WhatsApp clone with Next.js Part 17 Add AuthProvider

Detect whether user sign in or not

Ckmobile

--

Source code

Under the root folder, create Auth.js.

Then go inside Auth.js. First, we need to import useEffect, createContext, getAuth and useState.

--

--