Giter VIP home page Giter VIP logo

nextjs-firebase-authentication's Introduction

My Course Platform

Build Status Slack Greenkeeper badge

Server-Side User Management with

  • GraphQL (Tutorial) and Firebase (Tutorial)
    • Sign In
    • Sign Up
    • Sign Out
    • Email Change
    • Password Change
    • Password Reset

Client and Server-Side Protected Routes with

  • Next.js Authorization and Firebase Session

Payment with

  • Stripe
  • PayPal

Styling with

Type Support with

  • TypeScript

Tested Code Base with

Environment Variables with

Absolute Imports with

Sentry

More Features

  • Discounts with Coupons
  • Affiliate Marketing with Partner Program

Installation

  • git clone [email protected]:rwieruch/nextjs-firebase-authentication.git
  • cd nextjs-firebase-authentication
  • See other installation instructions below ...
  • npm install
  • npm run dev
  • Visit http://localhost:3000/

.env file

Create a .env file. If using git, add it to your .gitignore file.

Values may differ for development and production:

BASE_URL=http://localhost:3000

FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_DATABASE_URL=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=

PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=

STRIPE_CLIENT_ID=
STRIPE_CLIENT_SECRET=
STRIPE_WEBHOOK_SECRET=

COUPON_SALT=
COUPON_URL=
FIREBASE_ADMIN_UID=

SENTRY_DSN=

REVUE_TOKEN=

SLACK_TOKEN=

CONVERTKIT_API_KEY=
CONVERTKIT_FORM_ID=

S3_ENDPOINT=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_BUCKET=

DATABASE_TYPE=
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_SSL_CERTIFICATE=

.firebaseServiceAccountKey.json file

Visit here for Firebase Admin SDK and generate a firebaseServiceAccountKey.json file from there which should be in your project's root folder. If using git, add it to your .gitignore file.

Admin Account

If you want to have an account with Firebase admin claims, create this Firebase account first via UI, then set the user account's uid in .env with FIREBASE_ADMIN_UID, and restart your server.

Stripe CLI for Webhook in Development Mode

Stripe CLI

stripe login
# follow instructions
stripe listen --forward-to localhost:3000/api/stripe-webhook
# copy and paste secret

The secret can be used in .env:

STRIPE_WEBHOOK_SECRET=secret

Then fake a request with Stripe CLI stripe payment_intents create --amount=100 --currency=usd will work. Make sure the application is running too. Or use the web application's Stripe Checkout feature for real.

nextjs-firebase-authentication's People

Contributors

rwieruch avatar mellson avatar adenj avatar alexpanchuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.