https://github.com/jarrodwatts/gaminginfluencersite
A project I was planning on being a website where brands could connect with gaming influencers. Never ended up finishing it though.
https://github.com/jarrodwatts/gaminginfluencersite
firebase nextjs
Last synced: about 2 months ago
JSON representation
A project I was planning on being a website where brands could connect with gaming influencers. Never ended up finishing it though.
- Host: GitHub
- URL: https://github.com/jarrodwatts/gaminginfluencersite
- Owner: jarrodwatts
- Created: 2020-07-22T08:31:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-23T13:29:18.000Z (over 5 years ago)
- Last Synced: 2025-03-24T09:11:42.772Z (over 1 year ago)
- Topics: firebase, nextjs
- Language: JavaScript
- Homepage: https://gaminginfluencersite.vercel.app
- Size: 8.74 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example: Firebase authentication with a serverless API
This example includes Firebase authentication and serverless [API routes](https://nextjs.org/docs/api-routes/introduction).
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
```bash
npx create-next-app --example with-firebase-authentication with-firebase-authentication-app
# or
yarn create next-app --example with-firebase-authentication with-firebase-authentication-app
```
### Download manually
Download the example:
```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-firebase-authentication
cd with-firebase-authentication
```
## Configuration
Set up Firebase:y
- Create a project at the [Firebase console](https://console.firebase.google.com/).
- Copy the contents of `.env.local.example` into a new file called `.env.local`
- Get your account credentials from the Firebase console at _Project settings > Service accounts_, where you can click on _Generate new private key_ and download the credentials as a json file. It will contain keys such as `project_id`, `client_email` and `client_id`. Set them as environment variables in the `.env.local` file at the root of this project.
- Get your authentication credentials from the Firebase console under _Project settings > General> Your apps_ Add a new web app if you don't already have one. Under _Firebase SDK snippet_ choose _Config_ to get the configuration as JSON. It will include keys like `apiKey`, `authDomain` and `databaseUrl`. Set the appropriate environment variables in the `.env.local` file at the root of this project.
- Go to **Develop**, click on **Authentication** and in the **Sign-in method** tab enable authentication for the app.
Install it and run:
```bash
npm install
npm run dev
# or
yarn
yarn dev
```
Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
After deploying, copy the deployment URL and navigate to your Firebase project's Authentication tab. Scroll down in the page to "Authorized domains" and add that URL to the list.