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 290 forks source link

Api cannot handle in Netlify #496

Closed thanhtutzaw closed 2 years ago

thanhtutzaw commented 2 years ago

Describe the bug After login or create account api error occur and do not redirect to index and also no Cookie.

Issue only happen in Netlify ( Everything fine in Local Enviroment)

Screenshot (1148)

Versions next-firebase-auth version: v^0.14.4-alpha.0 and 1.0 canary Firebase JS SDK: v8,9 and v9.9 Next.js: v12.1.6

To Reproduce Steps to reproduce the behavior:

  1. Go to '...' https://too1.netlify.app/

You will notice 1. No redirect 2. No Cookie

Expected behavior I just need Cookie

Additional context I think there is issue with Firebase Private key : I can only add this env value with this format in Netlify env . "Bdfd key /n fool /netc End/n "

kmjennison commented 2 years ago

Could you check your backend logs for a more informative error? Or, if your code is the same as the example app's code, please modify the API endpoint to return the error (rather than "unexpected error" here).

thanhtutzaw commented 2 years ago

Could you check your backend logs for a more informative error? Or, if your code is the same as the example app's code, please modify the API endpoint to return the error (rather than "unexpected error" here).

Thanks . I missed one env ( Firebase_Client)