Closed splacentino closed 1 year ago
@splacentino Is it fixed if you use withAuthUserTokenSSR
in /login
rather than withAuthUserSSR
? It looks like there could be a mismatch here where the ID token value in cookies isn't valid, while the user value is valid.
@splacentino Is it fixed if you use
withAuthUserTokenSSR
in/login
rather thanwithAuthUserSSR
? It looks like there could be a mismatch here where the ID token value in cookies isn't valid, while the user value is valid.
Same issue.
I reproduced the same issue (same setup) on a brand new nextjs
pet project.
I found the issue:
got a nice non-UTF8 character in my FIREBASE_PRIVATE_KEY
.
Thanks for your support
Have you set
onVerifyTokenError
andonTokenRefreshError
in your config and checked for any helpful errors?Have you set
debug: true
in your config and read through server-side and client-side debug logs for any helpful messages?Have you tried the example app with your own Firebase credentials?
Have you read through the troubleshooting Q&A?
Describe the bug I am not able to run a wrapped
getServerSideProps
due to failure at getting user from cookies. It then does infinite redirection between the main page and the login page.Versions
next-firebase-auth
version:1.0.0-canary.18
Firebase JS SDK:9.14.0
Next.js:12.3.1
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Debug and error logs
Additional context
Main page (
/
):Login page (
/login
):Custom FirebaseAuth component:
configuration: