🔥 Easily integrate Firebase into your Nuxt project. 🔥
MIT License
Bot releases are visible (Hide)
Published by lupas almost 4 years ago
Published by lupas almost 4 years ago
⚠️ BREAKING CHANGES IN VERSION 7.0.0!:
Version 7 brings major breaking changes. Make sure to carefully read through the migration guide when migrate your application.
Version 7 comes with a handful of new features and some breaking changes in the naming of the $fire injections.
Check out the new Lazy mode, which allows you to load the Firebase services only where you need them. See the documentation and try it out yourself.
Version 7 also adds support for Firebase v8+ and adds the option to add the Firebase Auth
Make sure to carefully read through the migration guide when updating to this version.
Published by lupas over 4 years ago
If you are using the
messaging.createServiceWorker
option with message actions, make sure to read through the documentation again and adapt your message payload accordingly.
See here for example payload.
Published by lupas over 4 years ago
Huge thanks to @mentAl-maZe for the changes in auth.
Published by lupas over 4 years ago
ssr: true
did not load the ssrAuth.js plugin if no credentials were set.Published by lupas over 4 years ago
Thanks to @mentAl-maZe for the PR.
Published by lupas over 4 years ago
Thanks to @mentAl-maZe for the PR.
Published by lupas over 4 years ago
firebase.SDK_VERSION
)Thanks to @bernessco for the PR https://github.com/nuxt-community/firebase-module/pull/128
Published by lupas over 4 years ago
Version 5 brings various optimizations in the Auth module.
We moved the Auth initialization functionality out of experimental an introduced a new experimental functionality, SSR Auth Server Login.
Follow the upgrade guide here
See changelog here.
Published by lupas over 4 years ago
firebase-auth-sw.js
was only loaded when serverLogin === true
Published by lupas over 4 years ago
auth
in nuxt-config lead to an errorPublished by lupas over 4 years ago
With v4, nuxt-fire became an official nuxt-community module. <:o)
With this, the GitHub repository as well as the NPM location package name have changed.
In addition to that, nuxt-fire was renamed to @nuxtjs/firebase, to make it clear that this is the official Firebase module for Nuxt.js.
To make it consistent, we also changed certain namings within the module, so when upgrading from v3 to v4, you will have to change the following in your code:
// Old
modules: ['nuxt-fire'],
// New
modules: ['@nuxtjs/firebase'],
Only if options are not set directly in the modules-array:
// Old
fire: {
// all the options
}
// New
firebase: {
// all the options
}
Only if using typescript:
// Old
{
"compilerOptions": {
"types": ["nuxt-fire"]
}
}
// New
{
"compilerOptions": {
"types": ["@nuxtjs/firebase"]
}
}
Only if using helpers:
// Old
import { **helperFunctionName** } from 'nuxt-fire/src/helpers'
// New
import { **helperFunctionName** } from '@nuxtjs/firebase/src/helpers'
After all these changes, don't forget to rerun npm install
or yarn
and restart your IDE (e.g. VSCODE), then all should be good.
Published by lupas over 4 years ago
onFirebaseHosting
is now a global option which, once yet, is active for both the Firebase Authentication as well as the Messaging service workers.‼️ Important: If you had
onFirebaseHosting
defined onmessaging.onFirebaseHosting
, make sure to delete it there and define it directly on the nuxt-fire option objectfire.onFirebaseHosting
(see here).
Thanks for @zhuharev and @wandriputra for reporting the Messaging sw issue.
Published by lupas almost 5 years ago
Thanks to @mentAl-maZe for the PR!
Published by lupas almost 5 years ago
enablePersistence = true
used to throw an "unsupported" error on server-side. It now does not get triggered on server-side anymore.enablePersistence
can now also take an object which gets passed down as the official enablePersistance options, allowing e.g. to set synchronizeTabs: true
Many thanks to @mentAl-maZe for the pull-request!
Published by lupas almost 5 years ago
authUser
object can then be accessed in nuxtServerInit
.// In the nuxt.config.js nuxt-fire settings:
auth: {
initialize: {
ssr: true
}
},
For more information check out the Firebase Auth in SSR/Universal Mode Tutorial.
‼️ Careful: This feature is experimental, feel free to test it out but don't expect it to work perfectly in all cases. Please report an issue if you have question or problems with it.
fireStore.enablePersistence()