I want to use authentication service given by Firebase in my static website created by Docusaurus. is this possible ? Thank you in advance
I want to use authentication service given by Firebase in my static website created by Docusaurus. is this possible ? Thank you in advance
I want to help you with this problem since I got the same one. However, my previous answer was deleted because I attached my detailed blog on this matter only. I will try to give a better one this time so that the answer will reach you and others.
Can you use authentication for your Docusaurus, yes, you can. There is no official documentation on this, but the key point is that you swizzle the Root component, not allowed to render the content if no authentication state is provided via Firebase Auth since it is just ReactJS.
I wrote a detailed tutorial on this with full source code: https://medium.com/@thomasdevshare/docusaurus-authentication-with-firebase-c824da24bc51 Here is the full source code, you can clone and use it: https://github.com/thomasdevshare/docusaurus-auth-firebase
Just hope that my answer will get delivered this time.