Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: v1 roadmap #265

Closed
24 tasks done
kmjennison opened this issue Aug 7, 2021 · 24 comments
Closed
24 tasks done

RFC: v1 roadmap #265

kmjennison opened this issue Aug 7, 2021 · 24 comments
Labels
RFC Request for comments and ideas v1 Change intended to land in v1.x

Comments

@kmjennison
Copy link
Contributor

kmjennison commented Aug 7, 2021

next-firebase-auth has been reasonably stable for a while now and is already used in production apps, so it feels an appropriate time to move toward a v1 release.

This is an in-progress document of the changes that might land in v1. Please comment with any feedback or questions.

The unstable releases are available as next-firebase-auth@canary. When contributing, please make pull requests to the v1.x branch.

Demo: the demo app is deployed here.


Prerequisites

Making the package work better

Making the package more flexible

Preventing incorrect use

Developer tools

Cleanup

  • Make API name changes
    • Instances of AuthUser: AuthUser --> user
    • withAuthUser --> withUser
    • withAuthUserTokenSSR --> withUserTokenSSR
    • withAuthUserSSR --> withUserSSR
    • useAuthUser --> useUser
  • Review naming of exported types

Before release

@kmjennison kmjennison added the RFC Request for comments and ideas label Aug 7, 2021
@kmjennison kmjennison pinned this issue Aug 7, 2021
@HofmannZ
Copy link
Contributor

Hi, I'm picking up Firebase v9 support 👨‍💻

HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 29, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 30, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 30, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 30, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 30, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 30, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 31, 2021
HofmannZ added a commit to zino-hofmann/next-firebase-auth that referenced this issue Aug 31, 2021
@atanaskanchev
Copy link

@kmjennison @HofmannZ Hi, any updates on the v1 release?

@kmjennison
Copy link
Contributor Author

@atanaskanchev This is our checklist for a v1 release. I welcome contributions to speed things along. Meanwhile, v1 changes are available on the canary release channel.

@kmjennison
Copy link
Contributor Author

We might defer a unified cookie feature (#190) to a later release because:

  1. we won't want to complicate adoption of Firebase v9
  2. we haven't identified a suitable cookies library, and
  3. this library might have a cookie-free future (see Explore using service workers to manage sessions #287)

@kmjennison kmjennison changed the title [WIP] RFC: v1 roadmap RFC: v1 roadmap Oct 12, 2021
@VewMet
Copy link

VewMet commented Nov 2, 2021

When will this library be available for next 12 version ?

@kmjennison
Copy link
Contributor Author

@VewMet Next 12 is supported in the latest releases.

@PatrikTheDev
Copy link

Firebase-admin 10.0.0 support should also be added to the roadmap

@kmjennison
Copy link
Contributor Author

@Patrik-svobodik Firebase admin v10 is already supported.

@seanaguinaga
Copy link

Is Next.js' middleware functionality a place that next-firebase-auth could live? I assume it would be more performant? But does that make the hybrid server and client approach currently used almost impossible?

https://nextjs.org/docs/middleware

That could mean that pages lose auth/redirect on a page by page basis, instead be determined by file placement.

@kmjennison
Copy link
Contributor Author

@seanaguinaga Thanks for flagging this. I opened an issue for middleware discussion here: #418

@DiegoGonzalezCruz
Copy link

Hi guys, hope everything is going great. I am wondering if you have an estimated ETA for v1?

@kmjennison
Copy link
Contributor Author

@DiegoGonzalezCruz We don't have an ETA—we're making progress as we have time. We welcome contributions on open issues. Meanwhile, next-firebase-auth@canary is available to use.

@jodik
Copy link

jodik commented Jun 5, 2022

Hi,

it seems admin side is also modular:
import { initializeApp } from 'firebase-admin/app';

Currently we do:
import * as admin from 'firebase-admin'
admin.initializeApp()

@raajnadar
Copy link

@kmjennison is that safe to use next-firebase-auth@canary for a production app or the canary is for testing?

@kmjennison
Copy link
Contributor Author

@raajnadar Yes, the canary releases are intended to be fully functional and usable in production. However, they'll be less stable and less tested than major releases, so you should only use it if you have tolerance for possible bugs or breaking changes.

The current canary version will see more breaking changes before it hits v1 stable. See release notes for these changes.

@kmjennison kmjennison added the v1 Change intended to land in v1.x label Aug 25, 2022
@seanaguinaga
Copy link

@kmjennison I am having a hard time upgrading to v17 - the admin config for initAuth is different?

have a complete example?

@kmjennison
Copy link
Contributor Author

@seanaguinaga The config hasn't changed, but there are some breaking changes in v1.0.0-canary.17 (see release notes). Notably, we dropped support for firebase-admin v9 and removed the getFirebaseAdmin method. Instead, if you need the Firebase admin app, import it directly.

@louisgv
Copy link

louisgv commented Sep 7, 2022

@kmjennison I tried canary.17 and am receiving this error:

Error: The default Firebase app does not exist. Make sure you call initializeApp() before using any of the Firebase services.

canary.16 worked. With canary17, I removed the getFirebaseAdmin and replaced them with getFirestore() directly. I also ran initAuth() before these API route, even placed the initAuth right before the getFirestore() like this:

initAuth()
const firestore = getFirestore()

And the error still throw

@louisgv
Copy link

louisgv commented Sep 7, 2022

More context: I'm invoking these inside a getServerSideProps()

@louisgv
Copy link

louisgv commented Sep 7, 2022

Fixed it by wrapping the getServerSideProps inside the withAuthUser

EDIT: Apparently it worked locally, but when deploy it throws the error on the function...

@strid408
Copy link

strid408 commented Nov 5, 2022

I'm also having issues with the 'app/no-app' error code when trying to access the admin sdk on the server side. Both in API routes and getserversideprops. Strangely enough, it seems to work sometimes. I got it working suddenly, restarted the app, and then the errors came back..

@kmjennison
Copy link
Contributor Author

If you're running into a bug, please try the example app with your own Firebase credentials (if you haven't already) to see if the bug exists there. Then, please open an issue with a minimal example app and instructions to reproduce.

@kmjennison
Copy link
Contributor Author

v1 beta is out! 🎉 Check out the migration guide and let me know if you run into any issues.

@kmjennison
Copy link
Contributor Author

v1.0.0 has been released!

@kmjennison kmjennison unpinned this issue Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments and ideas v1 Change intended to land in v1.x
Projects
None yet
Development

No branches or pull requests