Overview
Finding a good way to add user authorization to a Firebase and Next.js app was not the easiest out there to find. So I thought ...
For further actions, you may consider blocking this person and/or reporting abuse
Am I reading this correctly, or would this require authorization for every single page in the app? How would I then differentiate from the pages that require auth vs the ones that don't? For instance, log in or home page don't require auth, but user's profile does, how do you then redirect away from the authenticated pages?
please can you share a repo for this example
I will try to get it up as a full working repo. Right now it is just from a project that I put together. I will try to put together a boiler plate example some time this week.
please in the _app.js cookies is not defined
I am sorry. I will update that I used 'next-cookies' to read them.
Edit:
Updated article that
_app.js
should usenext-cookies
Awesome tutorial. I needed a solution that was very small and flexible, with firestore users collection data. This is perfect!
There is no need for cookies I think, I would also use the new getServerSideProps instead of getInitialProps.
Can you give example code?
I wanted to understand, how you will get the user firebase token in server side without cookies?
Hi, What's the firebaseToken suppose to be?
Hi! How are you? Just in case the code is in a repository?
How can I use this validate function in a api route?