Replies: 6 comments 1 reply
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
-
I also get: |
Beta Was this translation helpful? Give feedback.
-
@Bowis now it works for me, the trick is to define your FIREBASE_PRIVATE_KEY like this |
Beta Was this translation helpful? Give feedback.
-
Here are a few steps that can help you debug:
|
Beta Was this translation helpful? Give feedback.
-
I had the same error as well. It was because my Firebase project was setup only with Firestore Database, not the Realtime Database. That meant I had to leave NEXT_PUBLIC_FIREBASE_DATABASE_URL blank. After I created the Realtime Database, I no longer get the error in setAuthCookies. My project does not require Realtime Database but it seems like I need to create that just for the purpose of using this library. |
Beta Was this translation helpful? Give feedback.
-
@Bowis Have you solved the issue? Here's what I'm getting:
|
Beta Was this translation helpful? Give feedback.
-
When filing a bug report, please confirm you've done the following:
Describe the bug
0
I have the following setup using Next-firebase-auth:
Login page:
Protected page:
Config:
Versions
next-firebase-auth
version: 1.0.0-canary.18Firebase JS SDK: 9.12.1
Next.js: latest
To Reproduce
After logging in, i get the next-firebase-auth: [getUserFromCookies] Failed to retrieve the ID token from cookies. This will happen if the user is not logged in, the provided cookie values are invalid, or the cookie values don't align with your cookie settings. The user will be unauthenticated. error, which redirects me to the login page, which in turn redirects me to the protected page again, creating an endless loop. When inspecting the cookies, I do see that they are being written, so I'm not sure where it is going wrong at the moment.
Beta Was this translation helpful? Give feedback.
All reactions