All Projects → colinhacks → Next Firebase Ssr

colinhacks / Next Firebase Ssr

An Next.js example repo for building authenticated pages with Firebase Authentication, cookies, and getServerSideProps

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Next Firebase Ssr

Nextjs Redux Firebase Authentication
Boilerplate Project for Authentication with Firebase in NextJs and Redux
Stars: ✭ 90 (-53.12%)
Mutual labels:  firebase, nextjs, authentication, firebase-auth
Material Kit React
React Dashboard made with Material UI’s components. Our pro template contains features like TypeScript version, authentication system with Firebase and Auth0 plus many other
Stars: ✭ 3,465 (+1704.69%)
Mutual labels:  firebase, authentication, firebase-auth, nextjs
Firebase Admin Java
Firebase Admin Java SDK
Stars: ✭ 345 (+79.69%)
Mutual labels:  firebase, authentication, firebase-auth
React Gatsby Firebase Authentication
🐣🔥Starter Project / Boilerplate for Authentication with Firebase and plain React in Gatsby.js
Stars: ✭ 356 (+85.42%)
Mutual labels:  firebase, authentication, firebase-auth
Pizzaql
🍕 Modern OSS Order Management System for Pizza Restaurants
Stars: ✭ 631 (+228.65%)
Mutual labels:  nextjs, authentication, ssr
Firebase Ios Sdk
Firebase iOS SDK
Stars: ✭ 3,309 (+1623.44%)
Mutual labels:  firebase, authentication, firebase-auth
React Redux Firebase Authentication
🔥Boilerplate Project for Authentication with Firebase in React and Redux
Stars: ✭ 265 (+38.02%)
Mutual labels:  firebase, authentication, firebase-auth
Firebase Admin Python
Firebase Admin Python SDK
Stars: ✭ 591 (+207.81%)
Mutual labels:  firebase, authentication, firebase-auth
Nextjs Firebase Authentication
Next.js + Firebase Starter
Stars: ✭ 502 (+161.46%)
Mutual labels:  firebase, nextjs, authentication
Moveit
🚀 NLW #4 | React+ TypeScript + NextJS + StyledComponents + Firebase + MongoDb +Axios
Stars: ✭ 39 (-79.69%)
Mutual labels:  firebase, nextjs, firebase-auth
React Firebase Authentication
🔥 Boilerplate Project for Authentication with Firebase in React.
Stars: ✭ 863 (+349.48%)
Mutual labels:  firebase, authentication, firebase-auth
Virapro.ru
[E-commerce] Plumbing Store
Stars: ✭ 45 (-76.56%)
Mutual labels:  firebase, firebase-auth, ssr
Firebase Functions Next Example
Host a Next.js SSR React app on Cloud Functions for Firebase with Firebase Hosting
Stars: ✭ 215 (+11.98%)
Mutual labels:  firebase, nextjs, ssr
Nodejs Auth
Implementation of node.js authentication with social login ✌️, user impersonation 💅, and no passport.js required 💁
Stars: ✭ 201 (+4.69%)
Mutual labels:  firebase, authentication, firebase-auth
Next Blog Firestore
Example of blog built with React, Next.js, Firebase Firestore, Styled-Component, Mobx State Tree and other cool technologies
Stars: ✭ 219 (+14.06%)
Mutual labels:  nextjs, firebase-auth, ssr
Firebase Admin Go
Firebase Admin Go SDK
Stars: ✭ 651 (+239.06%)
Mutual labels:  firebase, authentication, firebase-auth
React Mobx Firebase Authentication
🔥Boilerplate Project for Authentication with Firebase in React and MobX
Stars: ✭ 111 (-42.19%)
Mutual labels:  firebase, authentication, firebase-auth
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+872.4%)
Mutual labels:  firebase, authentication, firebase-auth
Petshop
Pet Shop is an e-commerce application for Android built with Flutter (iOS to come soon).
Stars: ✭ 127 (-33.85%)
Mutual labels:  firebase, firebase-auth
Quickstart Cpp
Firebase Quickstart Samples for C++
Stars: ✭ 123 (-35.94%)
Mutual labels:  firebase, firebase-auth

Next.js + Firebase + getServerSideProps

This project demonstrates how to implement authenticated server-side rendering with Next.js and Firebase Authentication.

Update November 19, 2020: A bug has been fixed where the Firebase tokens would expire after an hour without being refreshed. All tokens are now force refreshed every 10 minutes.

Update November 9, 2020: this repo has been updated to use the redirect functionality introduced in [email protected] . Currently you must be on the canary release of Next for this approach to work ( yarn add [email protected] ).

Versions

Documentation

Full walkthrough and documentation here: Authenticated server-side rendering with Next.js and Firebase.

How to use

To run this example:

  • Clone the repo: git clone [email protected]:vriad/next-firebase-ssr.git
  • Navigate into directory: cd next-firebase-ssr
  • Install dependencies: yarn
  • Create a Firebase project if you haven't already. Make sure you go into the Authentication tab in the Console, go to "Sign-in method", and enable "Email/Password"
  • Add your Firebase client credentials to firebaseClient.ts. To get these, go to the Firebase Console > open your project > Gear Icon > Project Settings > General > Your apps > Firebase SDK Snippet > click the "Config" radio button > copy/paste.
  • Add your service account (Admin) credentials to the project. To do this, go to the Firebase Console > open your project > click the gear icon > Project Settings > Service Accounts > click Node.js > Generate new private key. Open the JSON file that downloads. Then create a copy of .env.local.example and rename it to .env.local. This is the file where you will put your secret Firebase credentials. Copy/paste the values from the private key JSON file over to the new .env.local file: privateKey becomes PRIVATE_KEY, project_id becomes PROJECT_ID, and clientEmail becomes CLIENT_EMAIL.
  • Run yarn dev
  • Go to localhost:3000
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].