Skip to content
프로젝트

rwieruch/nextjs-firebase-authentication

GitHub에서 보기

소개

Next.js + Firebase 스타터

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

My Course Platform

Build Status 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 ...
  • yarn install
  • yarn 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.

관련 프로젝트 살펴보기

불러오는 중…