FirebaseError: Firebase: Error (auth/unauthorized-domain)

Hi I am a newbie in the ui world..Trying to build a webapp where I need user to sign in google cloud.I keep getting this error:

Steps I have taken:

  1. made sure authorized domain has entry of localhost

  2. made sure api key has restricted access to websites, and in the website I added localhost:*/*

Please help me here. My attempt to build an app using firebase studio ( without knowing typescript, node.js) is almost turning to make a fool of myself.

Some suggestions that do take time but hopefully help:

  • Prototype a (really) simple to-do app using “Prototype with AI”, in your prompt, add “allow Google sign-in”
  • Make sure you see sign-in as a feature in the generated app blueprint
  • Test the app locally (you still need to enable Google as a provider in Firebase Authentication in Firebase Console first)
  • Compare the code in a working app to the code in your current workspace and see what’s different / missing