Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephanepericat/nuxt-firebase-demo
https://github.com/stephanepericat/nuxt-firebase-demo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/stephanepericat/nuxt-firebase-demo
- Owner: stephanepericat
- Created: 2019-11-03T21:25:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T16:24:16.000Z (about 4 years ago)
- Last Synced: 2023-02-27T06:36:16.730Z (almost 2 years ago)
- Language: JavaScript
- Size: 362 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nuxt-firebase-demo
This demo app demonstrates how to use Firebase authentication in a [Nuxt.js](https://nuxtjs.org/) application.
## Configuring the demo app
Create your project in the [Firebase
Console](https://console.firebase.google.com).[Add Firebase to your app](https://firebase.google.com/docs/web/setup).
Enable the **Google** sign-in provider in the
**Authentication > SIGN-IN METHOD** tab.In the root folder (`/`), create a `firebase.init.js` file.
Copy and paste the Web snippet code configuration found in the console to the `firebase.init.js` file.
You can find the snippet by clicking the "Web setup" button in the Firebase Console
Authentication page.Ensure the application authorized domain is also whitelisted. `localhost` should already be set
as an authorized OAuth domain.Since the application is using the Firebase Admin SDK, service account credentials will be
required. Learn more on how to [add the Firebase Admin SDK to your
server](https://firebase.google.com/docs/admin/setup).After you generate a new private key, save it in the `/server` folder as
`serviceAccountKeys.json`.
Make sure to keep these credentials secret and never expose them in public.## Running the demo app
To run the demo app, run:
```bash
npm run dev
```This will launch a local server using port 3000.
To access the app, go to [http://localhost:3000/login](http://localhost:3000/login)