why doesn't create cookies in localhost after added firestore and SSR
thanhtutzaw opened this issue · 0 comments
Strange bugs in localhost after SSG , ISR , Firestore in my device
Describe the bug
First I connect firestore for data fetching after auth . then I write some SSR code and It works . then everything is crazy in Localhost .
- it doesn't redirect after auth
- it doesn't create cookies but it create firebase indexDB stuff
- I can confirm it happens in localhost , also in example app with same firebase config
- you can find my last (no error version) github file in here
- error happened when doing firestore , ssr and isr stuff in Localhost
- now my whole device have this error . also in official next-firebase-auth example app . I think I have problem in firebase account . But only error in localhost .
Versions
next-firebase-auth
version: ^1.0.0-canary.9
Firebase JS SDK: 9.9
Next.js: 12.1
Expected behavior
It should be create cookies and redirect to app after auth .
Debug and error logs
Error: Received 500 response from login API endpoint: {"error":"Unexpected error when Login"}
FirebaseAuthError: uid
argument must be a non-empty string uid.
at FirebaseTokenGenerator.createCustomToken (D:\React\Next\too\node_modules\firebase-admin\lib\auth\token-generator.js:99:19)
at Auth.createCustomToken (D:\React\Next\too\node_modules\firebase-admin\lib\auth\base-auth.js:88:36)
errorInfo: {
code: 'auth/argument-error',
message: 'uid
argument must be a non-empty string uid.'
},
codePrefix: 'auth'
}
Additional context
in Network tab after logged in , login api is pending and after 20s it says status 500 error in login API endpoint.