Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Firebase as database and user authentication #76

Open
RachelHow opened this issue Jun 6, 2020 · 3 comments
Open

Support for Firebase as database and user authentication #76

RachelHow opened this issue Jun 6, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@RachelHow
Copy link

I'm new to code and would like to learn how to set up using Firebase instead of MongoDB.

Would like to see an alternative code to Firebase instead, hope this is alright.

(I'm new to this so I'm not sure if I did it the right way. Sorry if I caused any issues!)

@RachelHow RachelHow changed the title Support for Firebase instead of MongoDB Support for Firebase as database and user authentication Jun 6, 2020
@hoangvvo hoangvvo added the good first issue Good for newcomers label Jun 9, 2020
@hoangvvo
Copy link
Owner

hoangvvo commented Jun 9, 2020

😞 So sorry I don't work with Firebase so I don't really know much about it, but I can try to point you toward the right directions.

Look at https://github.com/hoangvvo/nextjs-mongodb-app/blob/master/middlewares/database.js

You want initialize the Firebase store there and attach it to req (it can be req.db).

Then you want to rewrite all the function req.db.* to the equivalent in firebase. Also our session store is connect-mongo, which is for mongodb, so you need to replace it with the firebase equivalent too.

If you need any help along the way, feel free to ping me!

@victorfu
Copy link
Contributor

@RachelHow If you are looking for nextjs integrated with firebase, check this example https://github.com/vercel/next.js/tree/canary/examples/with-firebase

@athifbinu
Copy link

what is the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants