gladly-team / next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies
https://nfa-example-git-v1x-gladly-team.vercel.app/
MIT License
1.34k stars 291 forks source link

Replace react-firebaseui in demo app with a better-maintained package #555

Open xaphod opened 1 year ago

xaphod commented 1 year ago

I'm trying to clone the example and start from there. Am I doing it right?

tim$ npx create-next-app --example https://github.com/gladly-team/next-firebase-auth/tree/main/example newproject
Creating a new Next.js app in ....

Downloading files from repo https://github.com/gladly-team/next-firebase-auth/tree/main/example. This might take a moment.

Installing packages. This might take a couple of minutes.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: example@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=15 <=17" from react-firebaseui@5.0.2
npm ERR! node_modules/react-firebaseui
npm ERR!   react-firebaseui@"^5.0.2" from the root project

This is Node 16 / npm 8.3

kmjennison commented 1 year ago

@xaphod Ah, it looks like react-firebaseui doesn't yet support React 18: https://github.com/firebase/firebaseui-web-react/issues/165

It still works as expected in the example app, though (see live demo).

The react-firebaseui dependency isn't required to use next-firebase-auth. Here's someone's suggestion on just dropping it for the underlying firebaseui library: https://github.com/firebase/firebaseui-web-react/pull/173#issuecomment-1215648239

I think it makes sense for us to swap out react-firebaseui, too, given that it doesn't seem to be very actively maintained.