Giter Club home page Giter Club logo

Comments (6)

bojeil-google avatar bojeil-google commented on September 12, 2024

Hey kofifus, try adding the following snippet as described in the official documentation website:
https://firebase.google.com/docs/web/setup#add_firebase_to_your_app

// TODO: Replace with your project's customized code snippet
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>
<script>
  // Initialize Firebase
  var config = {
    apiKey: '<your-api-key>',
    authDomain: '<your-auth-domain>',
    databaseURL: '<your-database-url>',
    storageBucket: '<your-storage-bucket>'
  };
  firebase.initializeApp(config);
</script>

from quickstart-js.

kofifus avatar kofifus commented on September 12, 2024

ok thx :)

I did and I now get in the console:

Uncaught Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console. firebase.js:71

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null'). iframe.js:188

any help?

from quickstart-js.

nicolasgarnier avatar nicolasgarnier commented on September 12, 2024

Make sure you serve your files from a web server:

  1. Install the firebase CLI: npm install -g firebase-tools
  2. Serve your firebase project: firebase serve
  3. Open http://localhost:5000

PS: these instructions are in the README file that's in each folders of the samples ;)

from quickstart-js.

kofifus avatar kofifus commented on September 12, 2024

ok got it ... does this mean I now must have my firebase using files served from an http server ? in the old FB version I could simply load a local file to the browser ?

from quickstart-js.

nicolasgarnier avatar nicolasgarnier commented on September 12, 2024

Yes that's right, the new auth implementation doesn't allow file:// schemes to be whitelisted at this point so you need to access your app from an http:// URI.

from quickstart-js.

weepy avatar weepy commented on September 12, 2024

I think you should add this to the README.

from quickstart-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.